Mercurial > hg > octave-nkf
changeset 3887:7da18459c08b
[project @ 2002-04-04 00:44:21 by jwe]
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,26 @@ * configure.in: Correct usage of AC_ARG_WITH for --with-fftw. + * configure.in: Update for autoconf 2.5x. + Minor syntax changes to new recommended syntaxes and macros. + Apply changes from autoupdate plus eliminate some warning + messages, deprecated uses of changequote, etc. + Use autoheader templates to generate config.h.in. + Replace most of Octave's Fortran support macros with those in the + new autoconf. + Eliminate most uses of internal (undocumented) autoconf cache vars. + Replace BLAS/LAPACK detection new macros ACX_BLAS/ACX_LAPACK from + the autoconf macro repository. + * acx_blas.m4, acx_lapack.m4: New files. + * acconfig.h: Delete lines that can be automatically generated + from new info in configure.in and aclocal.m4. + If it is not already defined, define F77_FUNC for use with f2c. + * aclocal.m4 (OCTAVE_PROG_G77, OCTAVE_FLIBS, OCTAVE_F77_MAIN_FLAG, + OCTAVE_F77_UPPERCASE_NAMES, OCTAVE_F77_APPEND_UNDERSCORE, + OCTAVE_F2C_F77_COMPAT): Delete definitions. + Use autoheader templates to generate config.h.in. + * Makeconf.in, mkoctfile.in (FORTRAN_MAIN_FLAG): Delete all uses. + 2001-11-09 John W. Eaton <jwe@bevo.che.wisc.edu> * octave-bug.in (BLAS_LIBS, FFTW_LIBS, LD_CXX): Substitute and
--- a/Makeconf.in +++ b/Makeconf.in @@ -72,7 +72,6 @@ F77 = @F77@ FFLAGS = @FFLAGS@ FPICFLAG = @FPICFLAG@ -FORTRAN_MAIN_FLAG = @FORTRAN_MAIN_FLAG@ ALL_FFLAGS = $(FFLAGS) # cc and associated flags. @@ -130,8 +129,7 @@ LD_CXX = @LD_CXX@ LDFLAGS = @LDFLAGS@ LD_STATIC_FLAG = @LD_STATIC_FLAG@ -ALL_LDFLAGS = $(LIBFLAGS) $(FORTRAN_MAIN_FLAG) \ - $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS) +ALL_LDFLAGS = $(LIBFLAGS) $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS) SH_LD = @SH_LD@ SH_LDFLAGS = @SH_LDFLAGS@ @@ -374,7 +372,6 @@ -e "s;%OCTAVE_CONF_FFLAGS%;\"${FFLAGS}\";" \ -e "s;%OCTAVE_CONF_FFTW_LIBS%;\"${FFTW_LIBS}\";" \ -e "s;%OCTAVE_CONF_FLIBS%;\"${FLIBS}\";" \ - -e "s;%OCTAVE_CONF_FORTRAN_MAIN_FLAG%;\"${FORTRAN_MAIN_FLAG}\";" \ -e "s;%OCTAVE_CONF_FPICFLAG%;\"${FPICFLAG}\";" \ -e "s;%OCTAVE_CONF_GLOB_INCFLAGS%;\"${GLOB_INCFLAGS}\";" \ -e "s;%OCTAVE_CONF_INCFLAGS%;\"${INCFLAGS}\";" \
--- a/acconfig.h +++ b/acconfig.h @@ -6,137 +6,6 @@ Leave the following blank line there!! Autoheader needs it. */ -/* Define if your version of GNU libc has buggy inline assembly code - for math functions like exp. */ -#undef __NO_MATH_INLINES - -/* Define if you want bounds checking on element references for - internal array and matrix classes. */ -#undef BOUNDS_CHECKING - -/* Define to the C++ ABI your compiler uses. */ -#undef CXX_ABI - -/* Define if your C++ runtime library is ISO compliant. */ -#undef CXX_ISO_COMPLIANT_LIBRARY - -/* Define if your compiler supports `<>' stuff for template friends. */ -#undef CXX_NEW_FRIEND_TEMPLATE_DECL - -/* Define if your compiler prepends underscores to external names. */ -#undef CXX_PREPENDS_UNDERSCORE - -/* Define if your math.h declares struct exception for matherr() */ -#undef EXCEPTION_IN_MATH - -/* Define if your Fortran compiler appends an underscore to external - names. */ -#undef F77_APPEND_UNDERSCORE - -/* Define if your Fortran compiler converts external names to - upper case. */ -#undef F77_UPPERCASE_NAMES - -/* Define if your system has a single-arg prototype for gettimeofday. */ -#undef GETTIMEOFDAY_NO_TZ - -/* Define if your gnuplot supports multiplt plot windows with X11. */ -#undef GNUPLOT_HAS_FRAMES - -/* Define if your gnuplot has mutliplot. */ -#undef GNUPLOT_HAS_MULTIPLOT - -/* Define if your system's struct group has a gr_passwd field. */ -#undef HAVE_GR_PASSWD - -/* Define if you have (and are using) the HDF5 library and headers. */ -#undef HAVE_HDF5 - -/* Define if you have isinf(). */ -#undef HAVE_ISINF - -/* Define if you have isnan(). */ -#undef HAVE_ISNAN - -/* Define if you have BSD style signals. */ -#undef HAVE_BSD_SIGNALS - -/* Define if you have FFTW installed. */ -#undef HAVE_FFTW - -/* Define if you have POSIX style signals. */ -#undef HAVE_POSIX_SIGNALS - -/* Define if your system has program_invocation_name. */ -#undef HAVE_PROGRAM_INVOCATION_NAME - -/* Define if your system has a sys_siglist variable. */ -#undef HAVE_SYS_SIGLIST - -/* Define if your system defines struct timeval. */ -#undef HAVE_TIMEVAL - -/* Define if you have System V Release 3 style signals. */ -#undef HAVE_USG_SIGHOLD - -/* Define if signal handlers must be reinstalled after they are called. */ -#undef MUST_REINSTALL_SIGHANDLERS - -/* Define (to string::npos) if <string> doesn't. */ -#undef NPOS - -/* Define to compile smaller kernel. */ -#undef OCTAVE_LITE - -/* Define if this is Octave. */ -#undef OCTAVE_SOURCE - -/* Define if your struct rusage only has time information. */ -#undef RUSAGE_TIMES_ONLY - -/* Define if you are using an SCO system. */ -#undef SCO - -/* Define this to be the path separator for your system, as a - character constant */ -#undef SEPCHAR - -/* Define this to be the path separator for your system, as a - character string */ -#undef SEPCHAR_STR - -/* Define if math.h declares signgam. */ -#undef SIGNGAM_DECLARED - -/* To quiet autoheader. */ -#undef SMART_PUTENV - -/* Use plplot for plotting. */ -#undef USE_PLPLOT - -/* Use GNU readline for command line editing and history. */ -#undef USE_READLINE - -/* Define if using dlopen/dlsym for dynamic linking of object files. */ -#undef WITH_DL - -/* Define if using dld for dynamic linking of object files. */ -#undef WITH_SHL - -/* Define if using some method of dynamic linking. */ -#undef WITH_DYNAMIC_LINKING - -/* Define to `short' if <sys/types.h> doesn't define. */ -#undef dev_t - -/* Define to `unsigned long' if <sys/types.h> doesn't define. */ -#undef ino_t - -/* Define to `short' if <sys/types.h> doesn't define. */ -#undef nlink_t - -/* Define to `int' if <signal.h> doesn't define. */ -#undef sigset_t /* Leave that blank line there!! Autoheader needs it. @@ -167,3 +36,8 @@ #define HEAVYWEIGHT_INDEXING 1 #define WITH_KPATHSEARCH 1 + +#if defined(HAVE_F2C) && !defined(F77_FUNC) +# define F77_FUNC(x,X) x ## _ +# define F77_FUNC_(x,X) x ## __ +#endif
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -72,348 +72,6 @@ AC_SUBST(ARFLAGS) ]) dnl -dnl See if $F77 is the GNU Fortran compiler -dnl -AC_DEFUN(OCTAVE_PROG_G77, -[AC_CACHE_CHECK([whether ${F77-f77} is the GNU Fortran compiler], -octave_cv_f77_is_g77, -[if $use_g77; then - octave_cv_f77_is_g77=yes -else - echo " END" > conftest.f - foutput=`${F77-f77} -v conftest.f 2>&1 | egrep "GNU F77|FSF-g77"` - if test -n "$foutput"; then - octave_cv_f77_is_g77=yes - else - octave_cv_f77_is_g77=no - fi -fi]) -]) -dnl -dnl See what libraries are used by the Fortran compiler. -dnl -dnl Write a minimal program and compile it with -v. I don't know what -dnl to do if your compiler doesn't have -v... -dnl -dnl OCTAVE_FLIBS() -AC_DEFUN(OCTAVE_FLIBS, -[AC_MSG_CHECKING([for Fortran libraries]) -AC_REQUIRE([OCTAVE_HOST_TYPE]) -AC_CACHE_VAL(octave_cv_flibs, -[[ -echo " END" > conftest.f -foutput=`${F77-f77} -v -o conftest conftest.f 2>&1` - -### The easiest thing to do for xlf output is to replace all the commas -### with spaces. Try to only do that if the output is really from xlf, -### since doing that causes problems on other systems. - -xlf_p=`echo $foutput | grep xlfentry` -if test -n "$xlf_p"; then - foutput=`echo $foutput | sed 's/,/ /g'` -fi - -ld_run_path=`echo $foutput | \ - sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'` - -### We are only supposed to find this on Solaris systems... -### Uh, the run path should be absolute, shouldn't it? - -case "$ld_run_path" in - /*) - if test "$ac_cv_prog_gcc" = yes; then - ld_run_path="-Xlinker -R -Xlinker $ld_run_path" - else - ld_run_path="-R $ld_run_path" - fi - ;; - *) - ld_run_path= - ;; -esac - -flibs= -lflags= - -### If want_arg is set, we know we want the arg to be added to the list, -### so we don't have to examine it. - -want_arg= - -for arg in $foutput; do - old_want_arg=$want_arg - want_arg= - -### None of the options that take arguments expect the argument to -### start with a -, so pretend we didn't see anything special. - - if test -n "$old_want_arg"; then - case "$arg" in - -*) - old_want_arg= - ;; - esac - fi - case "$old_want_arg" in - '') - case $arg in - /*.a) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - lflags="$lflags $arg" - fi - ;; - -bI:*) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - if test "$ac_cv_prog_gcc" = yes; then - lflags="$lflags -Xlinker $arg" - else - lflags="$lflags $arg" - fi - fi - ;; - -lang* | -lcrt0.o | -lc | -lgcc) - arg= - ;; - -[lLR]) - want_arg=$arg - arg= - ;; - -[lLR]*) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - case "$arg" in - -lkernel32) - case "$canonical_host_type" in - *-*-cygwin32) - arg= - ;; - *) - lflags="$lflags $arg" - ;; - esac - ;; - -lm) - ;; - *) - lflags="$lflags $arg" - ;; - esac - fi - ;; - -u) - want_arg=$arg - arg= - ;; - -Y) - want_arg=$arg - arg= - ;; - *) - arg= - ;; - esac - ;; - -[lLR]) - arg="$old_want_arg $arg" - ;; - -u) - arg="-u $arg" - ;; - -Y) - -### Should probably try to ensure unique directory options here too. -### This probably only applies to Solaris systems, and then will only -### work with gcc... - - arg=`echo $arg | sed -e 's%^P,%%'` - SAVE_IFS=$IFS - IFS=: - list= - for elt in $arg; do - list="$list -L$elt" - done - IFS=$SAVE_IFS - arg="$list" - ;; - esac - if test -n "$arg"; then - flibs="$flibs $arg" - fi -done -if test -n "$ld_run_path"; then - flibs_result="$ld_run_path $flibs" -else - flibs_result="$flibs" -fi -] -octave_cv_flibs="$flibs_result"]) -FLIBS="$octave_cv_flibs" -AC_MSG_RESULT([$FLIBS])]) -dnl -dnl This is apparently needed on some Linux systems. -dnl -AC_DEFUN(OCTAVE_F77_MAIN_FLAG, -[FORTRAN_MAIN_FLAG= -case "$canonical_host_type" in - *-linux-*) - FORTRAN_MAIN_FLAG="-u MAIN__" - ;; -esac -if test -n "$FORTRAN_MAIN_FLAG"; then - AC_MSG_RESULT([defining FORTRAN_MAIN_FLAG to be $FORTRAN_MAIN_FLAG]) -fi -AC_SUBST(FORTRAN_MAIN_FLAG) -]) -dnl -dnl See if the Fortran compiler uses uppercase external names. -dnl -dnl OCTAVE_F77_UPPERCASE_NAMES() -AC_DEFUN(OCTAVE_F77_UPPERCASE_NAMES, -[AC_MSG_CHECKING([whether ${F77-f77} uses uppercase external names]) -AC_CACHE_VAL(octave_cv_f77_uppercase_names, -[octave_cv_f77_uppercase_names=no -cat > conftest.f <<EOF - subroutine xxyyzz () - return - end -EOF -if ${F77-f77} -c conftest.f 1>&AC_FD_CC 2>&AC_FD_CC; then - if test "`${NM-nm} conftest.o | grep XXYYZZ`" != ""; then - octave_cv_f77_uppercase_names=yes - fi -fi]) -AC_MSG_RESULT([$octave_cv_f77_uppercase_names]) -if test "$octave_cv_f77_uppercase_names" = yes; then - AC_DEFINE(F77_UPPERCASE_NAMES, 1) -fi]) -dnl -dnl See if the Fortran compiler appends underscores to external names. -dnl -dnl OCTAVE_F77_APPEND_UNDERSCORE() -AC_DEFUN(OCTAVE_F77_APPEND_UNDERSCORE, -[AC_MSG_CHECKING([whether ${F77-f77} appends underscores to external names]) -AC_REQUIRE([OCTAVE_F77_UPPERCASE_NAMES]) -AC_CACHE_VAL(octave_cv_f77_append_underscore, -[octave_cv_f77_append_underscore=no -cat > conftest.f <<EOF - subroutine xxyyzz () - return - end -EOF -if ${F77-f77} -c conftest.f 1>&AC_FD_CC 2>&AC_FD_CC; then - if test "$octave_cv_f77_uppercase_names" = yes; then - if test "`${NM-nm} conftest.o | grep XXYYZZ_`" != ""; then - octave_cv_f77_append_underscore=yes - fi - else - if test "`${NM-nm} conftest.o | grep xxyyzz_`" != ""; then - octave_cv_f77_append_underscore=yes - fi - fi -fi]) -AC_MSG_RESULT([$octave_cv_f77_append_underscore]) -if test "$octave_cv_f77_append_underscore" = yes; then - AC_DEFINE(F77_APPEND_UNDERSCORE, 1) -fi]) -dnl -dnl See if the Fortran compiler is compatible with f2c. -dnl -dnl Write a minimal program, compile it, and see if it works as -dnl expected. -dnl -dnl OCTAVE_F2C_F77_COMPAT() -AC_DEFUN(OCTAVE_F2C_F77_COMPAT, -[AC_REQUIRE([OCTAVE_PROG_G77]) -AC_REQUIRE([OCTAVE_FLIBS]) -AC_REQUIRE([OCTAVE_F77_APPEND_UNDERSCORE]) -if test "$cross_compiling" = yes; then - octave_cv_f2c_f77_compat=yes - if test "$octave_cv_f77_is_g77" = yes; then - AC_MSG_RESULT([assuming ${F77-f77} cross compiler is f2c compatible]) - else - AC_MSG_WARN([assuming ${F77-f77} cross compiler is f2c compatible]) - fi -else - AC_CACHE_CHECK([${F77-f77}/f2c compatibility], octave_cv_f2c_f77_compat, - [trap 'rm -f ftest* ctest* core; exit 1' 1 3 15 - octave_cv_f2c_f77_compat=no - cat > ftest.f <<EOF - SUBROUTINE FORSUB (C, I, D) - CHARACTER *(*) C - INTEGER L, I - DOUBLE PRECISION D - L = LEN (C) - WRITE (*, '(A,1X,I2)') C(1:L), INT (D) - I = 0 - RETURN - END -EOF - ${F77-f77} -c ftest.f 1>&AC_FD_CC 2>&AC_FD_CC - changequote(, ) - cat > ctest.c <<EOF -#include "confdefs.h" -#ifdef F77_APPEND_UNDERSCORE -extern int forsub_ (const char*, int*, double*, long int); -#else -extern int forsub (const char*, int*, double*, long int); -#endif -static char s[14]; -int main () -{ - double d = 10.0; - int len, i = 1; - strcpy (s, "FOO-I-HITHERE"); - len = strlen (s); -#ifdef F77_APPEND_UNDERSCORE - forsub_ (s, &i, &d, len); -#else - forsub (s, &i, &d, len); -#endif - return i; -} -#if defined (sun) -int MAIN_ () { return 0; } -#elif defined (linux) && defined (__ELF__) -int MAIN__ () { return 0; } -#endif -EOF - changequote([, ]) - if ${CC-cc} -c ctest.c 1>&AC_FD_CC 2>&AC_FD_CC; then - if ${CC-cc} -o ctest ctest.o ftest.o $FLIBS -lm 1>&AC_FD_CC 2>&AC_FD_CC; then - ctest_output=`./ctest 2>&1` - status=$? - if test $status -eq 0 && test "$ctest_output" = "FOO-I-HITHERE 10"; then - octave_cv_f2c_f77_compat=yes - fi - fi - fi]) -fi -rm -f ftest* ctest* core -]) -dnl dnl See if struct group has a gr_passwd field. dnl AC_DEFUN(OCTAVE_STRUCT_GR_PASSWD, @@ -422,7 +80,7 @@ #include <grp.h>], [struct group s; s.gr_passwd;], octave_cv_struct_gr_passwd=yes, octave_cv_struct_gr_passwd=no)]) if test $octave_cv_struct_gr_passwd = yes; then - AC_DEFINE(HAVE_GR_PASSWD) + AC_DEFINE(HAVE_GR_PASSWD,1,[Define if your system's struct group has a gr_passwd field.]) fi ]) dnl @@ -437,7 +95,7 @@ [size_t foo = NPOS], octave_cv_string_npos=yes, octave_cv_string_npos=no)]) if test $octave_cv_string_npos = no; then - AC_DEFINE(NPOS, std::string::npos) + AC_DEFINE(NPOS, [std::string::npos], [Define (to string::npos) if <string> doesn't]) fi AC_LANG_RESTORE ]) @@ -506,7 +164,7 @@ octave_cv_func_putenv_malloc=no)])dnl AC_MSG_RESULT($octave_cv_func_putenv_malloc) if test $octave_cv_func_putenv_malloc = yes; then - AC_DEFINE(SMART_PUTENV) + AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.]) fi]) dnl dnl These two checks for signal functions were originally part of the @@ -544,11 +202,11 @@ ]) AC_MSG_RESULT($octave_cv_signal_vintage) if test "$octave_cv_signal_vintage" = posix; then -AC_DEFINE(HAVE_POSIX_SIGNALS) +AC_DEFINE(HAVE_POSIX_SIGNALS,1,[Define if you have POSIX style signals.]) elif test "$octave_cv_signal_vintage" = "4.2bsd"; then -AC_DEFINE(HAVE_BSD_SIGNALS) +AC_DEFINE(HAVE_BSD_SIGNALS,1,[Define if you have BSD style signals.]) elif test "$octave_cv_signal_vintage" = svr3; then -AC_DEFINE(HAVE_USG_SIGHOLD) +AC_DEFINE(HAVE_USG_SIGHOLD,1,[Define if you have System V Release 3 signals.]) fi ]) dnl @@ -607,7 +265,7 @@ AC_MSG_RESULT($octave_cv_must_reinstall_sighandlers) fi if test "$octave_cv_must_reinstall_sighandlers" = yes; then - AC_DEFINE(MUST_REINSTALL_SIGHANDLERS) + AC_DEFINE(MUST_REINSTALL_SIGHANDLERS,1,[Define if signal handlers must be reinstalled after they are called.]) fi ]) dnl @@ -629,10 +287,10 @@ ], octave_cv_type_$1=yes, octave_cv_type_$1=no)]) AC_MSG_RESULT($octave_cv_type_$1) ifelse($#, 4, [if test $octave_cv_type_$1 = yes; then - AC_DEFINE($4) + AC_DEFINE($4, 1, [Define if you have typedef $1.]) fi]) if test $octave_cv_type_$1 = no; then - AC_DEFINE($1, $3) + AC_DEFINE($1, $3, [Define to typedef for $1.]) fi ]) dnl @@ -670,7 +328,7 @@ ]) AC_MSG_RESULT($octave_cv_cxx_new_friend_template_decl) if test $octave_cv_cxx_new_friend_template_decl = yes; then - AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL) + AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL,1,[Define if your compiler supports `<>' stuff for template friends.]) fi ]) dnl @@ -806,9 +464,9 @@ AC_MSG_RESULT(assuming $GNUPLOT_BINARY exists on $canonical_host_type host) AC_SUBST(DEFAULT_PAGER) AC_MSG_RESULT(assuming $GNUPLOT_BINARY supports multiplot mode) - AC_DEFINE(GNUPLOT_HAS_MULTIPLOT, 1) + AC_DEFINE(GNUPLOT_HAS_MULTIPLOT, 1, [Define if gnuplot has multiplot.]) AC_MSG_RESULT(assuming $GNUPLOT_BINARY supports multiple frams) - AC_DEFINE(GNUPLOT_HAS_FRAMES, 1) + AC_DEFINE(GNUPLOT_HAS_FRAMES, 1, [Define if gnuplot has frames.]) else AC_CHECK_PROG(GNUPLOT_BINARY, gnuplot, gnuplot, []) if test -n "$GNUPLOT_BINARY"; then @@ -927,7 +585,7 @@ ]) AC_MSG_RESULT($octave_cv_cxx_prepends_underscore) if test $octave_cv_cxx_prepends_underscore = yes; then - AC_DEFINE(CXX_PREPENDS_UNDERSCORE) + AC_DEFINE(CXX_PREPENDS_UNDERSCORE, 1, [Define if your compiler prepends underscores to external names.]) fi ]) dnl @@ -964,7 +622,7 @@ ]) AC_MSG_RESULT($octave_cv_cxx_iso_compliant_library) if test $octave_cv_cxx_iso_compliant_library = yes; then - AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY) + AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define if your C++ runtime library is ISO compliant.]) fi ]) dnl @@ -983,7 +641,7 @@ if $USE_READLINE; then AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ LIBS="-lreadline $LIBS" - AC_DEFINE(USE_READLINE, 1) + AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.]) ], [ AC_MSG_WARN([I need GNU Readline 4.2 or later]) AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) @@ -1025,6 +683,6 @@ AC_LANG_RESTORE ]) AC_MSG_RESULT($octave_cv_cxx_abi) - AC_DEFINE_UNQUOTED(CXX_ABI, $octave_cv_cxx_abi) + AC_DEFINE_UNQUOTED(CXX_ABI, $octave_cv_cxx_abi, [Define to the C++ ABI your compiler uses.]) ])
new file mode 100644 --- /dev/null +++ b/acx_blas.m4 @@ -0,0 +1,151 @@ +dnl @synopsis ACX_BLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +dnl +dnl This macro looks for a library that implements the BLAS +dnl linear-algebra interface (see http://www.netlib.org/blas/). +dnl On success, it sets the BLAS_LIBS output variable to +dnl hold the requisite library linkages. +dnl +dnl To link with BLAS, you should link with: +dnl +dnl $BLAS_LIBS $LIBS $FLIBS +dnl +dnl in that order. FLIBS is the output variable of the +dnl AC_F77_LIBRARY_LDFLAGS macro (called if necessary by ACX_BLAS), +dnl and is sometimes necessary in order to link with F77 libraries. +dnl Users will also need to use AC_F77_DUMMY_MAIN (see the autoconf +dnl manual), for the same reason. +dnl +dnl Many libraries are searched for, from ATLAS to CXML to ESSL. +dnl The user may also use --with-blas=<lib> in order to use some +dnl specific BLAS library <lib>. In order to link successfully, +dnl however, be aware that you will probably need to use the same +dnl Fortran compiler (which can be set via the F77 env. var.) as +dnl was used to compile the BLAS library. +dnl +dnl ACTION-IF-FOUND is a list of shell commands to run if a BLAS +dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands +dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, +dnl the default action will define HAVE_BLAS. +dnl +dnl This macro requires autoconf 2.50 or later. +dnl +dnl @version $Id: acx_blas.m4,v 1.2 2001/12/13 01:03:06 simons Exp $ +dnl @author Steven G. Johnson <stevenj@alum.mit.edu> +dnl +AC_DEFUN([ACX_BLAS], [ +AC_PREREQ(2.50) +AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) +acx_blas_ok=no + +AC_ARG_WITH(blas, + [AC_HELP_STRING([--with-blas=<lib>], [use BLAS library <lib>])]) +case $with_blas in + yes | "") ;; + no) acx_blas_ok=disable ;; + -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; + *) BLAS_LIBS="-l$with_blas" ;; +esac + +# Get fortran linker names of BLAS functions to check for. +AC_F77_FUNC(sgemm) +AC_F77_FUNC(dgemm) + +acx_blas_save_LIBS="$LIBS" +LIBS="$LIBS $FLIBS" + +# First, check BLAS_LIBS environment variable +if test $acx_blas_ok = no; then +if test "x$BLAS_LIBS" != x; then + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" + AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS]) + AC_TRY_LINK_FUNC($sgemm, [acx_blas_ok=yes], [BLAS_LIBS=""]) + AC_MSG_RESULT($acx_blas_ok) + LIBS="$save_LIBS" +fi +fi + +# BLAS linked to by default? (happens on some supercomputers) +if test $acx_blas_ok = no; then + save_LIBS="$LIBS"; LIBS="$LIBS" + AC_CHECK_FUNC($sgemm, [acx_blas_ok=yes]) + LIBS="$save_LIBS" +fi + +# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) +if test $acx_blas_ok = no; then + AC_CHECK_LIB(atlas, ATL_xerbla, + [AC_CHECK_LIB(f77blas, $sgemm, + [AC_CHECK_LIB(cblas, cblas_dgemm, + [acx_blas_ok=yes + BLAS_LIBS="-lcblas -lf77blas -latlas"], + [], [-lf77blas -latlas])], + [], [-latlas])]) +fi + +# BLAS in PhiPACK libraries? (requires generic BLAS lib, too) +if test $acx_blas_ok = no; then + AC_CHECK_LIB(blas, $sgemm, + [AC_CHECK_LIB(dgemm, $dgemm, + [AC_CHECK_LIB(sgemm, $sgemm, + [acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"], + [], [-lblas])], + [], [-lblas])]) +fi + +# BLAS in Alpha CXML library? +if test $acx_blas_ok = no; then + AC_CHECK_LIB(cxml, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-lcxml"]) +fi + +# BLAS in Alpha DXML library? (now called CXML, see above) +if test $acx_blas_ok = no; then + AC_CHECK_LIB(dxml, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-ldxml"]) +fi + +# BLAS in Sun Performance library? +if test $acx_blas_ok = no; then + if test "x$GCC" != xyes; then # only works with Sun CC + AC_CHECK_LIB(sunmath, acosp, + [AC_CHECK_LIB(sunperf, $sgemm, + [BLAS_LIBS="-xlic_lib=sunperf -lsunmath" + acx_blas_ok=yes],[],[-lsunmath])]) + fi +fi + +# BLAS in SCSL library? (SGI/Cray Scientific Library) +if test $acx_blas_ok = no; then + AC_CHECK_LIB(scs, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lscs"]) +fi + +# BLAS in SGIMATH library? +if test $acx_blas_ok = no; then + AC_CHECK_LIB(complib.sgimath, $sgemm, + [acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"]) +fi + +# BLAS in IBM ESSL library? (requires generic BLAS lib, too) +if test $acx_blas_ok = no; then + AC_CHECK_LIB(blas, $sgemm, + [AC_CHECK_LIB(essl, $sgemm, + [acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas"], + [], [-lblas $FLIBS])]) +fi + +# Generic BLAS library? +if test $acx_blas_ok = no; then + AC_CHECK_LIB(blas, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lblas"]) +fi + +AC_SUBST(BLAS_LIBS) + +LIBS="$acx_blas_save_LIBS" + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_blas_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1]) + : +else + acx_blas_ok=no + $2 +fi +])dnl ACX_BLAS
new file mode 100644 --- /dev/null +++ b/acx_lapack.m4 @@ -0,0 +1,93 @@ +dnl @synopsis ACX_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +dnl +dnl This macro looks for a library that implements the LAPACK +dnl linear-algebra interface (see http://www.netlib.org/lapack/). +dnl On success, it sets the LAPACK_LIBS output variable to +dnl hold the requisite library linkages. +dnl +dnl To link with LAPACK, you should link with: +dnl +dnl $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS +dnl +dnl in that order. BLAS_LIBS is the output variable of the ACX_BLAS +dnl macro, called automatically. FLIBS is the output variable of the +dnl AC_F77_LIBRARY_LDFLAGS macro (called if necessary by ACX_BLAS), +dnl and is sometimes necessary in order to link with F77 libraries. +dnl Users will also need to use AC_F77_DUMMY_MAIN (see the autoconf +dnl manual), for the same reason. +dnl +dnl The user may also use --with-lapack=<lib> in order to use some +dnl specific LAPACK library <lib>. In order to link successfully, +dnl however, be aware that you will probably need to use the same +dnl Fortran compiler (which can be set via the F77 env. var.) as +dnl was used to compile the LAPACK and BLAS libraries. +dnl +dnl ACTION-IF-FOUND is a list of shell commands to run if a LAPACK +dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands +dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, +dnl the default action will define HAVE_LAPACK. +dnl +dnl @version $Id: acx_lapack.m4,v 1.3 2002/03/12 09:12:44 simons Exp $ +dnl @author Steven G. Johnson <stevenj@alum.mit.edu> + +AC_DEFUN([ACX_LAPACK], [ +AC_REQUIRE([ACX_BLAS]) +acx_lapack_ok=no + +AC_ARG_WITH(lapack, + [AC_HELP_STRING([--with-lapack=<lib>], [use LAPACK library <lib>])]) +case $with_lapack in + yes | "") ;; + no) acx_lapack_ok=disable ;; + -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; + *) LAPACK_LIBS="-l$with_lapack" ;; +esac + +# Get fortran linker name of LAPACK function to check for. +AC_F77_FUNC(cheev) + +# We cannot use LAPACK if BLAS is not found +if test "x$acx_blas_ok" != xyes; then + acx_lapack_ok=noblas +fi + +# First, check LAPACK_LIBS environment variable +if test "x$LAPACK_LIBS" != x; then + save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" + AC_MSG_CHECKING([for $cheev in $LAPACK_LIBS]) + AC_TRY_LINK_FUNC($cheev, [acx_lapack_ok=yes], [LAPACK_LIBS=""]) + AC_MSG_RESULT($acx_lapack_ok) + LIBS="$save_LIBS" + if test acx_lapack_ok = no; then + LAPACK_LIBS="" + fi +fi + +# LAPACK linked to by default? (is sometimes included in BLAS lib) +if test $acx_lapack_ok = no; then + save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" + AC_CHECK_FUNC($cheev, [acx_lapack_ok=yes]) + LIBS="$save_LIBS" +fi + +# Generic LAPACK library? +for lapack in lapack lapack_rs6k; do + if test $acx_lapack_ok = no; then + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" + AC_CHECK_LIB($lapack, $cheev, + [acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack"], [], [$FLIBS]) + LIBS="$save_LIBS" + fi +done + +AC_SUBST(LAPACK_LIBS) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_lapack_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_LAPACK,1,[Define if you have LAPACK library.]),[$1]) + : +else + acx_lapack_ok=no + $2 +fi +])dnl ACX_LAPACK
--- a/configure.in +++ b/configure.in @@ -21,14 +21,19 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.352 $) -AC_PREREQ(2.9) -AC_INIT(src/octave.cc) +AC_INIT +AC_REVISION($Revision: 1.353 $) +AC_PREREQ(2.52) +AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) -AC_DEFINE(OCTAVE_SOURCE, 1) +AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) + +OCTAVE_HOST_TYPE -OCTAVE_HOST_TYPE +AC_ISC_POSIX +AC_MINIX +AC_AIX ### some defaults @@ -68,8 +73,8 @@ ### Path separator. -AC_DEFINE(SEPCHAR, [':']) -AC_DEFINE(SEPCHAR_STR, [":"]) +AC_DEFINE(SEPCHAR, [':'], Define this to be the path separator for your system, as a character constant.]) +AC_DEFINE(SEPCHAR_STR, [":"], [Define this to the path separator, as a string.]) ### Allow the user to force us to use f2c. @@ -126,7 +131,7 @@ dnl PLPLOT_DIR=""; dnl fi], []) dnl if $USE_PLPLOT; then -dnl AC_DEFINE(USE_PLPLOT, 1) +dnl AC_DEFINE(USE_PLPLOT, 1, [Define to use plplot.]) dnl fi AC_SUBST(LIBPLPLOT) AC_SUBST(PLPLOT_DIR) @@ -143,7 +148,7 @@ [ --enable-bounds-check for internal array classes (default is no)], [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], []) if $BOUNDS_CHECKING; then - AC_DEFINE(BOUNDS_CHECKING, 1) + AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.]) fi ### It seems that there are some broken inline assembly functions in @@ -151,7 +156,7 @@ ### GNU libc, just disable them for all platforms. AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) -AC_DEFINE(__NO_MATH_INLINES, 1) +AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.]) ### See which C++ compiler to use (we expect to find g++). @@ -173,14 +178,10 @@ # cxx_auto_instantiate_templates=yes case "$gxx_version" in -changequote(,)dnl - 1.* | 2.[0123456].* | 2.7.[01]*) -changequote([,])dnl + 1.* | 2.[[0123456]].* | 2.7.[01]*) AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave]) ;; -changequote(,)dnl - 2.8* | 2.9[1-6]*) -changequote([,])dnl + 2.8* | 2.9[[1-6]]*) cxx_auto_instantiate_templates=no ;; esac @@ -255,9 +256,7 @@ ieee_fp_flag= case "$canonical_host_type" in -changequote(,)dnl - i[3456789]86-*-*) -changequote([,])dnl + i[[3456789]]86-*-*) OCTAVE_CC_FLAG(-mieee-fp, [ ieee_fp_flag=-mieee-fp XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" @@ -353,7 +352,7 @@ WITH_HDF5=true HDF5_LIBS="-l$hdf5_lib -lz" LIBS="$HDF5_LIBS $LIBS" - AC_DEFINE(HAVE_HDF5)])])]) + AC_DEFINE(HAVE_HDF5,1,[Define if HDF5 is available.])])])]) fi # Checks for FFTW header and library. @@ -371,9 +370,9 @@ with_fftw=$withval, with_fftw=yes) if test "$with_fftw" = "yes"; then - AC_CHECK_HEADERS(dfftw.h fftw.h) - if test "$ac_cv_header_dfftw_h" = yes \ - || test "$ac_cv_header_fftw_h" = yes; then + have_fftw_header=no + AC_CHECK_HEADERS(dfftw.h fftw.h, [have_fftw_header=yes; break]) + if test "$have_fftw_header" = yes; then AC_CHECK_LIB(dfftw, fftw_create_plan, FFTW_LIBS="-ldfftw", [AC_CHECK_LIB(fftw, fftw_create_plan, FFTW_LIBS="-lfftw", with_fftw=no)]) else @@ -383,7 +382,7 @@ if test "$with_fftw" = yes; then FFT_DIR='' - AC_DEFINE(HAVE_FFTW) + AC_DEFINE(HAVE_FFTW,1,[Define if the FFTW library is available.]) fi # ---------------------------------------------------------------------- @@ -396,20 +395,7 @@ ### If we haven't been forced to use a particular Fortran compiler, ### try to find one using any one of several common Un*x Fortran -### compiler names. Put fc last to avoid confusion with some vendor's -### /bin/sh fc builtin. -### -### f77 : most Unix systems -### xlf : IBM / AIX -### cf77 : Cray / Unicos -### g77 : GNU Fortran -### fc : Convex -### -### If a compiler is found, check to see if it is compatible with our -### assumptions. If it is, use it. Otherwise, look for f2c. If we -### can't find a compatible fortran compiler or f2c, issue a warning. -### -### I don't think the Cray compiler will ever work like f2c... +### compiler names using the AC_PROG_F77 macro. ### ### The configure options --with-f77, --with-g77, or --with-f2c ### force f77, g77 or f2c to be used. It is also possible to use @@ -439,10 +425,15 @@ F2C="$with_f2c" fi AC_MSG_RESULT([defining F2C to be $F2C]) -else - AC_CHECK_PROGS(F77, g77 f77 f90 xlf cf77 fc) fi +if test "x$FFLAGS" = x; then + FFLAGS="-O" # override -g -O default by AC_PROG_F77 +fi + +# the F77 variable, if set, overrides AC_PROG_F77 automatically +AC_PROG_F77 + have_fortran_compiler=false have_f2c=false @@ -450,33 +441,24 @@ have_f2c=true else if test -n "$F77"; then - OCTAVE_FLIBS - OCTAVE_F77_APPEND_UNDERSCORE - OCTAVE_F2C_F77_COMPAT - if test "$octave_cv_f2c_f77_compat" = no; then - F77= - else - if test -z "$FFLAGS"; then - FFLAGS="-O" - fi - case "$canonical_host_type" in - alpha*-*-*) - if test "$octave_cv_f77_is_g77" = yes; then - FFLAGS="$ieee_fp_flag $FFLAGS" - else - FFLAGS="-fpe1 $FFLAGS" - fi - ;; - powerpc-apple-machten*) - FFLAGS= - ;; - esac - if test -n "$FFLAGS"; then - AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) - fi + AC_F77_LIBRARY_LDFLAGS + AC_F77_DUMMY_MAIN + AC_F77_WRAPPERS + case "$canonical_host_type" in + alpha*-*-*) + if test "$ac_cv_f77_compiler_gnu" = yes; then + FFLAGS="$ieee_fp_flag $FFLAGS" + else + FFLAGS="-fpe1 $FFLAGS" + fi + ;; + powerpc-apple-machten*) + FFLAGS= + ;; + esac + if test -n "$FFLAGS"; then + AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) fi - fi - if test -n "$F77"; then have_fortran_compiler=true else AC_CHECK_PROG(F2C, f2c, f2c, []) @@ -489,7 +471,6 @@ f77_rules_frag=/dev/null if $have_fortran_compiler; then f77_rules_frag=Makefrag.f77 -changequote(,)dnl cat << \EOF > $f77_rules_frag %.c : %.f @@ -501,17 +482,8 @@ $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o $@ EOF -changequote([,])dnl elif $have_f2c; then - AC_DEFINE(F77_APPEND_UNDERSCORE, 1) - AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1]) - -### This seems to be necessary on some Linux system. - - cat > conftest.$ac_ext << EOF -int MAIN_ () { return 0; } -int MAIN__ () { return 0; } -EOF + AC_DEFINE(HAVE_F2C, 1, [Define if we are using f2c.]) ### XXX FIMXE XXX -- these shouldn't be fixed names, eh? @@ -519,9 +491,9 @@ oct_obj_ext=o if AC_TRY_EVAL(ac_compile); then - $AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&AC_FD_CC + $AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&AS_MESSAGE_LOG_FD() if test -n "$RANLIB"; then - $RANLIB $oct_conflib 1>&AC_FD_CC + $RANLIB $oct_conflib 1>&AS_MESSAGE_LOG_FD() fi fi rm -f conftest* @@ -554,8 +526,6 @@ AC_MSG_ERROR([See the file INSTALL for more information.]) fi -OCTAVE_F77_MAIN_FLAG - FC=$F77 AC_SUBST(FC) AC_SUBST(F77) @@ -566,125 +536,15 @@ AC_SUBST_FILE(f77_rules_frag) ### Checks for BLAS and LAPACK libraries: - -### XXX FIXME XXX -- how can user specify a set of libraries here? +# (Build subdirectories of libcruft if they aren't found on the system.) -### Subdirectories of libcruft to build if they aren't found on the system: - -BLAS_DIR="blas" -LAPACK_DIR="lapack" +sinclude(acx_blas.m4) +sinclude(acx_lapack.m4) +ACX_BLAS([], [BLAS_DIR="blas"]) +ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"]) AC_SUBST(BLAS_DIR) AC_SUBST(LAPACK_DIR) -### names of Fortran dgemm & cheev functions to check for (depends upon -### F77 compiler name-mangling scheme): - -if test "$octave_cv_f77_uppercase_names" = yes; then - if test "$octave_cv_f77_append_underscore" = yes; then - dgemm_func=DGEMM_ - cheev_func=CHEEV_ - else - dgemm_func=DGEMM - cheev_func=CHEEV - fi -else - if test "$octave_cv_f77_append_underscore" = yes || test -n "${F2C}"; then - dgemm_func=dgemm_ - cheev_func=cheev_ - else - dgemm_func=dgemm - cheev_func=cheev - fi -fi - -AC_ARG_WITH(fastblas, - [ --without-fastblas use included (generic) BLAS and LAPACK], - with_fastblas=$withval, with_fastblas=yes) - -if test "$with_fastblas" = no; then - BLAS_LIBS=" " -elif test "$with_fastblas" != yes; then - # user specified a BLAS library to try on the command line - AC_CHECK_LIB($with_fastblas, $dgemm_func, - BLAS_LIBS="-l$with_fastblas", , $FLIBS) -fi - -if test "x$BLAS_LIBS" = x; then - # Checks for ATLAS BLAS library: - AC_CHECK_LIB(atlas, ATL_xerbla, BLAS_LIBS="-latlas") - if test "x$BLAS_LIBS" != x; then - # check for other atlas libs: - AC_CHECK_LIB(cblas, cblas_dgemm,BLAS_LIBS="-lcblas $BLAS_LIBS",,$BLAS_LIBS) - AC_CHECK_LIB(f77blas, $dgemm_func, - BLAS_LIBS="-lf77blas $BLAS_LIBS", , $BLAS_LIBS $FLIBS) - fi -fi - -if test "x$BLAS_LIBS" = x; then - # BLAS in Alpha CXML library? - AC_CHECK_LIB(cxml, $dgemm_func, BLAS_LIBS="-lcxml", , $FLIBS) -fi - -if test "x$BLAS_LIBS" = x; then - # BLAS in Alpha DXML library? (now called CXML, see above) - AC_CHECK_LIB(dxml, $dgemm_func, BLAS_LIBS="-ldxml", , $FLIBS) -fi - -if test "x$BLAS_LIBS" = x; then - # Check for BLAS in Sun Performance library: - AC_CHECK_LIB(sunmath, acosp, BLAS_LIBS="-lsunmath") - # Don't use AC_CHECK_LIB here. - saved_LIBS="$LIBS" - LIBS="$LIBS $BLAS_LIBS -xlic_lib=sunperf" - AC_CHECK_FUNC($dgemm_func, BLAS_LIBS="-xlic_lib=sunperf $BLAS_LIBS",) - LIBS="$saved_LIBS" -fi - -if test "x$BLAS_LIBS" = x; then - # Check for BLAS in SCSL and SGIMATH libraries (prefer SCSL): - AC_CHECK_LIB(scs, $dgemm_func, - BLAS_LIBS="-lscs", - AC_CHECK_LIB(complib.sgimath, $dgemm_func, - BLAS_LIBS="-lcomplib.sgimath", , $FLIBS), $FLIBS) -fi - -if test "x$BLAS_LIBS" = x; then - # Checks for BLAS in IBM ESSL library. We must also link - # with -lblas in this case (ESSL does not include the full BLAS): - AC_CHECK_LIB(blas, zherk, - AC_CHECK_LIB(essl, $dgemm_func, - BLAS_LIBS="-lessl -lblas", , $FLIBS), , $FLIBS) -fi - -if test "x$BLAS_LIBS" = x; then - # Finally, check for the generic BLAS library: - AC_CHECK_LIB(blas, $dgemm_func, BLAS_LIBS="-lblas", , $FLIBS) -fi - -if test "$with_fastblas" = no; then - # Unset BLAS_LIBS so that we know below that nothing was found. - BLAS_LIBS="" -fi - -if test "x$BLAS_LIBS" != x; then - BLAS_DIR="" # don't build our own BLAS - -### Check for LAPACK library. Note that ATLAS has its own liblapack.a, -### which is designed to be combined with the real LAPACK. cheev is a -### function in the real LAPACK but not in ATLAS's version, so this -### (hopefully) insures that we are getting the real LAPACK. Note also -### that on some systems, LAPACK is included in the math library -### (e.g. DXML) that we already linked to above...we detect this by -### doing AC_CHECK_FUNC if -llapack isn't found: - - AC_CHECK_LIB(lapack, $cheev_func, - [BLAS_LIBS="-llapack $BLAS_LIBS"; LAPACK_DIR=""], - [AC_CHECK_FUNC($cheev_func, LAPACK_DIR="")], - [$BLAS_LIBS $FLIBS]) -fi - -AC_SUBST(BLAS_LIBS) - ### Handle dynamic linking and shared library options. ### Allow the user to experiment with dynamic linking using dlopen/dlsym. @@ -783,9 +643,7 @@ SONAME_FLAGS='-Xlinker -soname -Xlinker $@' RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)' ;; -changequote(,)dnl - i[3456]86-*-sco3.2v5*) -changequote([,])dnl + i[[3456]]86-*-sco3.2v5*) SONAME_FLAGS='-Xlinker -h -Xlinker $@' RLD_FLAG= SH_LDFLAGS=-G @@ -797,7 +655,7 @@ DLFCN_DIR=dlfcn ;; hppa*-hp-hpux*) - if test "$octave_cv_f77_is_g77" = yes; then + if test "$ac_cv_f77_compiler_gnu" = yes; then FPICFLAG=-fPIC else FPICFLAG=+Z @@ -813,7 +671,7 @@ RLD_FLAG='-L$(octlibdir)' ;; sparc-sun-sunos4*) - if test "$octave_cv_f77_is_g77" = yes; then + if test "$ac_cv_f77_compiler_gnu" = yes; then FPICFLAG=-fPIC else FPICFLAG=-PIC @@ -823,7 +681,7 @@ RLD_FLAG='-L$(octlibdir)' ;; sparc-sun-solaris2* | i386-pc-solaris2*) - if test "$octave_cv_f77_is_g77" = yes; then + if test "$ac_cv_f77_compiler_gnu" = yes; then FPICFLAG=-fPIC else FPICFLAG=-KPIC @@ -889,7 +747,7 @@ else OCTAVE_LITE=true; fi], OCTAVE_LITE=false) if $OCTAVE_LITE; then - AC_DEFINE(OCTAVE_LITE, 1) + AC_DEFINE(OCTAVE_LITE, 1, [Define to compile smaller kernel.]) fi AC_SUBST(OCTAVE_LITE) @@ -898,20 +756,8 @@ ### I am told that on some SCO systems, the only place to find some ### functions like gethostname and gettimeofday is in libsocket. -AC_ISC_POSIX -AC_MINIX -AC_AIX -AC_CHECK_FUNCS(gethostname getpwnam) -if test "$ac_cv_func_gethostname" = yes; then - true -else - AC_CHECK_LIB(socket, gethostname) -fi -if test "$ac_cv_func_getpwnam" = yes; then - true -else - AC_CHECK_LIB(sun, getpwnam) -fi +AC_CHECK_FUNCS(gethostname, [], [AC_CHECK_LIB(socket, gethostname)]) +AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) ### How big are ints and how are they oriented? These could probably ### be eliminated in favor of run-time checks. @@ -923,7 +769,7 @@ ### Does the C compiler handle alloca() and const correctly? -AC_ALLOCA +AC_FUNC_ALLOCA([]) AC_C_CONST ### See if we should define NPOS. @@ -938,26 +784,33 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(assert.h curses.h dlfcn.h fcntl.h float.h \ - floatingpoint.h fnmatch.h glob.h grp.h ieeefp.h limits.h memory.h \ - nan.h ncurses.h poll.h pwd.h sgtty.h stdlib.h string.h sys/ioctl.h \ + floatingpoint.h grp.h ieeefp.h limits.h memory.h \ + nan.h ncurses.h poll.h pwd.h stdlib.h string.h sys/ioctl.h \ sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ sys/time.h sys/times.h sys/types.h sys/utsname.h termcap.h \ - termio.h $TERMIOS_H unistd.h varargs.h) + unistd.h varargs.h) + +have_termios_h=no +AC_CHECK_HEADERS($TERMIOS_H, have_termios_h=yes) +AC_CHECK_HEADERS(termio.h, have_termio_h=yes, have_termio_h=no) +AC_CHECK_HEADERS(sgtty.h, have_sgtty_h=yes, have_sgtty_h=no) +AC_CHECK_HEADERS(glob.h, have_glob_h=yes, have_glob_h=no) +AC_CHECK_HEADERS(fnmatch.h, have_fnmatch_h=yes, have_fnmatch_h=no) ### I'm told that termios.h is broken on NeXT systems. case "$canonical_host_type" in *-*-nextstep*) - if test "$ac_cv_header_termios_h" = yes; then + if test "$have_termios_h" = yes; then AC_MSG_WARN([Ignoring termios.h on NeXT systems.]) - ac_cv_header_termios_h=no + have_termios_h=no fi ;; esac -if test "$ac_cv_header_termios_h" = yes \ - || test "$ac_cv_header_termio_h" = yes \ - || test "$ac_cv_header_sgtty_h" = yes; then +if test "$have_termios_h" = yes \ + || test "$have_termio_h" = yes \ + || test "$have_sgtty_h" = yes; then true else AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!]) @@ -970,37 +823,26 @@ GLOB_DIR=glob LIBGLOB='$(TOPDIR)/glob/glob.o $(TOPDIR)/glob/fnmatch.o' GLOB_INCFLAGS='-I$(top_srcdir)/glob -I$(TOPDIR)/glob' -if test "$ac_cv_header_fnmatch_h" = yes \ - && test "$ac_cv_header_glob_h" = yes; then - AC_EGREP_CPP(yes, - [#ifdef FNM_NOESCAPE - #ifdef FNM_FOOBAR_PATHNAME - #ifdef FNM_PERIOD - yes - #endif - #endif - #endif +if test "$have_fnmatch_h" = yes && test "$have_glob_h" = yes; then + AC_EGREP_CPP(yes, [#include <fnmatch.h> +#ifdef FNM_NOESCAPE +#ifdef FNM_FOOBAR_PATHNAME /* FIXME: delete FOOBAR_ ? */ +#ifdef FNM_PERIOD + yes +#endif +#endif +#endif ], [ GLOB_DIR= AC_CHECK_LIB(glob, glob) - AC_CHECK_FUNCS(fnmatch glob) - if test "$ac_cv_func_fnmatch" = yes \ - && test "$ac_cv_func_glob" = yes; then + AC_CHECK_FUNCS(fnmatch, have_fnmatch=yes, have_fnmatch=no) + AC_CHECK_FUNCS(glob, have_glob=yes, have_glob=no) + if test "$have_fnmatch" = yes && test "$have_glob" = yes; then GLOB_DIR= LIBGLOB= GLOB_INCFLAGS= fi - ], [ -### We provide replacements, so we should set these to "yes". - AC_CACHE_VAL(ac_cv_func_fnmatch, ac_cv_func_fnmatch=yes) - AC_CACHE_VAL(ac_cv_func_glob, ac_cv_func_glob=yes) ]) -else -### We provide replacements, so we should set these to "yes". - ac_cv_header_fnmatch_h=yes - ac_cv_header_glob_h=yes - AC_CACHE_VAL(ac_cv_func_fnmatch, ac_cv_func_fnmatch=yes) - AC_CACHE_VAL(ac_cv_func_glob, ac_cv_func_glob=yes) fi AC_SUBST(GLOB_DIR) AC_SUBST(LIBGLOB) @@ -1031,20 +873,15 @@ DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' WITH_DL=true ;; -changequote(,)dnl - i[3456]86-*-sco3.2v5*) -changequote([,])dnl + i[[3456]]86-*-sco3.2v5*) LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' WITH_DL=true ;; *) AC_CHECK_LIB(dl, dlopen) - AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) - if test "$ac_cv_func_dlopen" = yes \ - && test "$ac_cv_func_dlsym" = yes \ - && test "$ac_cv_func_dlerror" = yes \ - && test "$ac_cv_func_dlclose" = yes; then - WITH_DL=true + AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose, [], [have_dl=false]) + if test "x$have_dl" != xfalse; then + WITH_DL=true else if test "$WITH_DL" = yes; then AC_MSG_ERROR([--enable-dl specified, but functions are missing!]) @@ -1055,7 +892,7 @@ esac if $WITH_DL; then OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) - AC_DEFINE(WITH_DL, 1) + AC_DEFINE(WITH_DL, 1, [Define if using dlopen/dlsym.]) fi else WITH_DL=false @@ -1068,9 +905,8 @@ if test "$WITH_SHL" = yes || test "$WITH_SHL" = maybe; then AC_CHECK_LIB(dld, shl_load) - AC_CHECK_FUNCS(shl_load shl_findsym) - if test "$ac_cv_func_shl_load" = yes \ - && test "$ac_cv_func_shl_findsym" = yes; then + AC_CHECK_FUNCS(shl_load shl_findsym, [], [have_shl=false]) + if test "x$have_shl" != xfalse; then WITH_SHL=true else if test "$WITH_SHL" = yes; then @@ -1079,7 +915,7 @@ WITH_SHL=false fi if $WITH_SHL; then - AC_DEFINE(WITH_SHL, 1) + AC_DEFINE(WITH_SHL, 1, [Define if using dld for dynamic linking.]) fi else WITH_SHL=false @@ -1090,7 +926,7 @@ ### has been determined. if $WITH_DL || $WITH_SHL; then - AC_DEFINE(WITH_DYNAMIC_LINKING, 1) + AC_DEFINE(WITH_DYNAMIC_LINKING, 1, [Define if using dynamic linking.]) WITH_DYNAMIC_LINKING=true else WITH_DYNAMIC_LINKING=false @@ -1114,7 +950,7 @@ #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], [AC_MSG_RESULT(yes) HAVE_TIMEVAL=yes - AC_DEFINE(HAVE_TIMEVAL)], + AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])], [AC_MSG_RESULT(no) HAVE_TIMEVAL=no]) @@ -1132,7 +968,7 @@ #endif],[struct timeval time; struct timezone dummy; gettimeofday (&time, &dummy);], [AC_MSG_RESULT(no)], [AC_MSG_RESULT(yes) - AC_DEFINE(GETTIMEOFDAY_NO_TZ)]) + AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1, [Define if your system has a single-arg prototype for gettimeofday.])]) fi dnl Would like to get rid of this cruft, and just have @@ -1155,11 +991,11 @@ ;; *-*-sco*) AC_MSG_RESULT([defining SCO to be 1]) - AC_DEFINE(SCO, 1) + AC_DEFINE(SCO, 1, [Define if using an SCO system.]) AC_MSG_RESULT([forcing HAVE_ISINF for SCO]) - AC_DEFINE(HAVE_ISINF, 1) + AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().]) AC_MSG_RESULT([forcing HAVE_ISNAN for SCO]) - AC_DEFINE(HAVE_ISNAN, 1) + AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().]) ;; *) AC_CHECK_FUNCS(finite isnan isinf) @@ -1172,33 +1008,29 @@ ### Checks for OS specific cruft. -AC_STRUCT_ST_BLKSIZE -AC_STRUCT_ST_BLOCKS -AC_STRUCT_ST_RDEV +AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev]) + AC_STRUCT_TM AC_STRUCT_TIMEZONE AC_FUNC_CLOSEDIR_VOID OCTAVE_STRUCT_GR_PASSWD +octave_found_termlib=no for termlib in ncurses curses termcap terminfo termlib; do AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"]) case "${TERMLIBS}" in *-l${termlib}*) LIBS="$TERMLIBS $LIBS" + octave_found_termlib=yes break ;; esac done -if test "$ac_cv_lib_termcap_tputs" = yes \ - || test "$ac_cv_lib_terminfo_tputs" = yes \ - || test "$ac_cv_lib_ncurses_tputs" = yes \ - || test "$ac_cv_lib_curses_tputs" = yes \ - || test "$ac_cv_lib_termlib_tputs" = yes; then - true -else - warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, or -ltermlib!" +if test "$octave_found_termlib" = no; then + warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, o\ +r -ltermlib!" AC_MSG_WARN($warn_termlibs) fi @@ -1208,7 +1040,7 @@ AC_TRY_LINK([#include <math.h>], [struct exception *x; x->type; x->name;], AC_MSG_RESULT(yes) - AC_DEFINE(EXCEPTION_IN_MATH, 1), + AC_DEFINE(EXCEPTION_IN_MATH, 1, [Define if your math.h declares struct exception for matherr().]), AC_MSG_RESULT(no)) ### Signal stuff. @@ -1219,7 +1051,7 @@ AC_TRY_LINK([#include <stdio.h>], [extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SYS_SIGLIST, 1), + AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if your system has a sys_siglist variable.]), AC_MSG_RESULT(no)) OCTAVE_SIGNAL_CHECK OCTAVE_REINSTALL_SIGHANDLERS @@ -1241,7 +1073,7 @@ AC_CHECK_FUNCS(getrusage times) case "$canonical_host_type" in *-*-cygwin32) - AC_DEFINE(RUSAGE_TIMES_ONLY, 1) + AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.]) ;; esac @@ -1349,11 +1181,22 @@ export CXX export F77 -AC_CONFIG_SUBDIRS($GLOB_DIR kpathsea scripts $PLPLOT_DIR) +AC_CONFIG_SUBDIRS(kpathsea scripts) + +# autoconf 2.50 deprecates the use of variables (e.g. $GLOB_DIR) +# in AC_CONFIG_SUBDIRS; the following form is recommended instead: + +if test "x$GLOB_DIR" = xglob; then + AC_CONFIG_SUBDIRS(glob) +fi + +if test "x$PLPLOT_DIR" = xplplot; then + AC_CONFIG_SUBDIRS(plplot) +fi ### Do the substitutions in all the Makefiles. -AC_OUTPUT(Makefile octMakefile Makeconf install-octave \ +AC_CONFIG_FILES([Makefile octMakefile Makeconf install-octave \ test/Makefile dlfcn/Makefile \ doc/Makefile doc/faq/Makefile doc/interpreter/Makefile \ doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile \ @@ -1367,9 +1210,10 @@ libcruft/quadpack/Makefile libcruft/ranlib/Makefile \ libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile \ libcruft/villad/Makefile \ - libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile) + libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile]) +AC_OUTPUT -AC_OUTPUT_COMMANDS([chmod +x install-octave]) +AC_CONFIG_COMMANDS([default-1],[[chmod +x install-octave]],[[]]) ### Print a summary so that important information isn't missed.
--- a/glob/ChangeLog +++ b/glob/ChangeLog @@ -1,3 +1,7 @@ +2002-04-03 Steven G. Johnson <stevenj@alum.mit.edu> + + * configure.in: Update for autoconf 2.5x. + 2000-03-21 John W. Eaton <jwe@bevo.che.wisc.edu> * COPYING.LIB: Delete.
--- a/glob/configure.in +++ b/glob/configure.in @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(fnmatch.c) dnl A distinctive file to look for in srcdir. -AC_PREREQ(2.1) dnl Minimum Autoconf version required. +AC_INIT +AC_CONFIG_SRCDIR([fnmatch.c]) dnl A distinctive file to look for in srcdir. +AC_PREREQ(2.52) dnl Minimum Autoconf version required. AC_PROG_CC AC_CHECK_PROG(AR, ar, ar, ar) AC_PROG_RANLIB @@ -9,11 +10,12 @@ AC_AIX AC_MINIX AC_ISC_POSIX -AC_CONST +AC_C_CONST([]) AC_HEADER_STDC AC_CHECK_HEADERS(memory.h unistd.h string.h) AC_HEADER_DIRENT AC_FUNC_CLOSEDIR_VOID AC_FUNC_ALLOCA AC_FUNC_STRCOLL -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT
--- a/kpathsea/ChangeLog +++ b/kpathsea/ChangeLog @@ -1,3 +1,7 @@ +2002-04-03 Steven G. Johnson <stevenj@alum.mit.edu> + + * configure.in, c-auto.in: Update for autoconf 2.5x. + 2001-11-27 Trond Eivind Glomsrød <teg@redhat.com> * progname.c (kpse_set_program_name): Fix typo.
--- a/kpathsea/c-auto.in +++ b/kpathsea/c-auto.in @@ -22,14 +22,6 @@ #undef HAVE_STRSTR -/* Define if the closedir function returns void instead of int. */ -#undef CLOSEDIR_VOID - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS /* Define if your compiler understands prototypes. */ #undef HAVE_PROTOTYPES @@ -49,6 +41,13 @@ `program_invocation_name' and `program_invocation_short_name'. */ #undef HAVE_PROGRAM_INVOCATION_NAME +/* Define if you get clashes concerning wchar_t, between X's include + files and system includes. */ +#undef FOIL_X_WCHAR_T + +/* tex: Define to enable --ipc. */ +#undef IPC + /* all: Define to enable running scripts when missing input files. */ #define MAKE_TEX_MF_BY_DEFAULT 0 #define MAKE_TEX_PK_BY_DEFAULT 0 @@ -57,65 +56,123 @@ #define MAKE_OMEGA_OFM_BY_DEFAULT 0 #define MAKE_OMEGA_OCP_BY_DEFAULT 0 -/* Define if you have the basename function. */ +/* web2c: Define if gcc asm needs _ on external symbols. */ +#undef ASM_NEEDS_UNDERSCORE + +/* web2c: Define when using system-specific files for arithmetic. */ +#undef ASM_SCALED_FRACTION + +/* web2c: Define to enable HackyInputFileNameForCoreDump.tex. */ +#undef FUNNY_CORE_DUMP + +/* web2c: Define to disable architecture-independent dump files. + Faster on LittleEndian architectures. */ +#undef NO_DUMP_SHARE + +/* web2c: Default editor for interactive `e' option. */ +#define EDITOR "vi +%d %s" + +/* web2c: Window system support for Metafont. */ +#undef EPSFWIN +#undef HP2627WIN +#undef MFTALKWIN +#undef NEXTWIN +#undef REGISWIN +#undef SUNWIN +#undef TEKTRONIXWIN +#undef UNITERMWIN +#undef X11WIN + +/* xdvik: Define if you have SIGIO, F_SETOWN, and FASYNC. */ +#undef HAVE_SIGIO + +/* xdvik: Define to avoid using any toolkit (and consequently omit lots + of features). */ +#undef NOTOOL + +/* Define if the `closedir' function returns void instead of `int'. */ +#undef CLOSEDIR_VOID + +/* Define if you have the <assert.h> header file. */ +#undef HAVE_ASSERT_H + +/* Define if you have the `basename' function. */ #undef HAVE_BASENAME -/* Define if you have the bcopy function. */ +/* Define if you have the `bcopy' function. */ #undef HAVE_BCOPY -/* Define if you have the getcwd function. */ -#undef HAVE_GETCWD - -/* Define if you have the getwd function. */ -#undef HAVE_GETWD - -/* Define if you have the putenv function. */ -#undef HAVE_PUTENV - -/* Define if you have the strcasecmp function. */ -#undef HAVE_STRCASECMP - -/* Define if you have the strstr function. */ -#undef HAVE_STRSTR - -/* Define if you have the strtol function. */ -#undef HAVE_STRTOL - -/* Define if you have the <assert.h> header file. */ -#undef HAVE_ASSERT_H - -/* Define if you have the <dirent.h> header file. */ +/* Define if you have the <dirent.h> header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H -/* Define if you have the <float.h> header file. */ +/* Define if you have the <float.h> header file. */ #undef HAVE_FLOAT_H -/* Define if you have the <limits.h> header file. */ +/* Define if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define if you have the `getwd' function. */ +#undef HAVE_GETWD + +/* Define if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H -/* Define if you have the <memory.h> header file. */ +/* Define if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H -/* Define if you have the <ndir.h> header file. */ +/* Define if you have the <ndir.h> header file, and it defines `DIR'. */ #undef HAVE_NDIR_H -/* Define if you have the <pwd.h> header file. */ +/* Define if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define if you have the <pwd.h> header file. */ #undef HAVE_PWD_H -/* Define if you have the <stdlib.h> header file. */ +/* Define if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H -/* Define if you have the <string.h> header file. */ +/* Define if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define if you have the <string.h> header file. */ #undef HAVE_STRING_H -/* Define if you have the <sys/dir.h> header file. */ +/* Define if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define if you have the <sys/dir.h> header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H -/* Define if you have the <sys/ndir.h> header file. */ +/* Define if you have the <sys/ndir.h> header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H -/* Define if you have the <sys/param.h> header file. */ +/* Define if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H -/* Define if you have the <unistd.h> header file. */ +/* Define if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const
--- a/kpathsea/configure.in +++ b/kpathsea/configure.in @@ -1,5 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(pathsearch.c) +AC_INIT +AC_CONFIG_SRCDIR([pathsearch.c]) +AC_PREREQ(2.52) dnl Minimum Autoconf version required. KPSEVERSION=3.2 AC_SUBST(KPSEVERSION) @@ -7,6 +9,7 @@ sinclude(common.ac) -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT dnl Update stamp-auto, since we just remade `c-auto.h'. date >stamp-auto
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,13 @@ +2002-04-03 Steven G. Johnson <stevenj@alum.mit.edu> + + * misc/machar.c: Use F77_FUNC instead of checking + F77_APPEND_UNDERSCORE. + * misc/f77-fcn.h: Don't define F77_FCN. + (xSTRINGIZE, STRINGIZE): New macros. + (F77_XFCN_ERROR): Simplify by using STRINGIZE and F77_FUNC. + (F77_XFCN): Use F77_FUNC instead of F77_FCN. + * misc/f77-fcn.c: Use F77_FUNC instead of F77_FCN. + 2001-11-01 John W. Eaton <jwe@bevo.che.wisc.edu> * Makefile.in (DISTSUBDIRS): Add fftpack.
--- a/libcruft/misc/f77-fcn.c +++ b/libcruft/misc/f77-fcn.c @@ -44,7 +44,7 @@ is necessary. */ volatile void -F77_FCN (xstopx, XSTOPX) (const char *s, long int slen) +F77_FUNC (xstopx, XSTOPX) (const char *s, long int slen) { /* Skip printing message if it is just a single blank character. */ if (s && slen > 0 && ! (slen == 1 && *s == ' '))
--- a/libcruft/misc/f77-fcn.h +++ b/libcruft/misc/f77-fcn.h @@ -29,34 +29,16 @@ #include <setjmp.h> -/* Some Fortran compilers append underscores or generate uppercase - external names. */ - -#if defined (F77_APPEND_UNDERSCORE) -#if defined (F77_UPPERCASE_NAMES) -#define F77_FCN(f, F) F##_ -#else -#define F77_FCN(f, F) f##_ -#endif -#else -#if defined (F77_UPPERCASE_NAMES) -#define F77_FCN(f, F) F -#else -#define F77_FCN(f, F) f -#endif -#endif +/* hack to stringize macro results */ +#define xSTRINGIZE(x) #x +#define STRINGIZE(x) xSTRINGIZE(x) /* How to print an error for the F77_XFCN macro. */ -#if defined (F77_UPPERCASE_NAMES) #define F77_XFCN_ERROR(f, F) \ (*current_liboctave_error_handler) \ - ("exception encountered in Fortran subroutine %s", #F) -#else -#define F77_XFCN_ERROR(f, F) \ - (*current_liboctave_error_handler) \ - ("exception encountered in Fortran subroutine %s", #f) -#endif + ("exception encountered in Fortran subroutine %s", \ + STRINGIZE (F77_FUNC (f, F))) /* This can be used to call a Fortran subroutine that might call XSTOPX. XSTOPX will call lonjmp with f77_context and we'll return, @@ -76,7 +58,7 @@ F77_XFCN_ERROR (f, F); \ } \ else \ - F77_FCN (f, F) args; \ + F77_FUNC (f, F) args; \ copy_f77_context ((char *) saved_f77_context, (char *) f77_context, \ sizeof (jmp_buf)); \ } \
--- a/libcruft/misc/machar.c +++ b/libcruft/misc/machar.c @@ -365,11 +365,7 @@ } void -#if defined (F77_APPEND_UNDERSCORE) -machar_ (REAL *xmin, REAL *xmax, REAL *epsneg, REAL *eps, REAL *log10_ibeta) -#else -machar (REAL *xmin, REAL *xmax, REAL *epsneg, REAL *eps, REAL *log10_ibeta) -#endif +F77_FUNC(machar,MACHAR) (REAL *xmin, REAL *xmax, REAL *epsneg, REAL *eps, REAL *log10_ibeta) { int ibeta, iexp, irnd, it, machep, maxexp, minexp, negep, ngrd;
--- a/liboctave/CColVector.cc +++ b/liboctave/CColVector.cc @@ -41,7 +41,7 @@ extern "C" { - int F77_FCN (zgemv, ZGEMV) (const char*, const int&, const int&, + int F77_FUNC (zgemv, ZGEMV) (const char*, const int&, const int&, const Complex&, const Complex*, const int&, const Complex*, const int&, const Complex&, Complex*, const int&,
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -63,32 +63,32 @@ extern "C" { - int F77_FCN (zgebal, ZGEBAL) (const char*, const int&, Complex*, + int F77_FUNC (zgebal, ZGEBAL) (const char*, const int&, Complex*, const int&, int&, int&, double*, int&, long, long); - int F77_FCN (dgebak, DGEBAK) (const char*, const char*, const int&, + int F77_FUNC (dgebak, DGEBAK) (const char*, const char*, const int&, const int&, const int&, double*, const int&, double*, const int&, int&, long, long); - int F77_FCN (zgemm, ZGEMM) (const char*, const char*, const int&, + int F77_FUNC (zgemm, ZGEMM) (const char*, const char*, const int&, const int&, const int&, const Complex&, const Complex*, const int&, const Complex*, const int&, const Complex&, Complex*, const int&, long, long); - int F77_FCN (zgeco, ZGECO) (Complex*, const int&, const int&, int*, + int F77_FUNC (zgeco, ZGECO) (Complex*, const int&, const int&, int*, double&, Complex*); - int F77_FCN (zgedi, ZGEDI) (Complex*, const int&, const int&, int*, + int F77_FUNC (zgedi, ZGEDI) (Complex*, const int&, const int&, int*, Complex*, Complex*, const int&); - int F77_FCN (zgesl, ZGESL) (Complex*, const int&, const int&, int*, + int F77_FUNC (zgesl, ZGESL) (Complex*, const int&, const int&, int*, Complex*, const int&); - int F77_FCN (zgelss, ZGELSS) (const int&, const int&, const int&, + int F77_FUNC (zgelss, ZGELSS) (const int&, const int&, const int&, Complex*, const int&, Complex*, const int&, double*, double&, int&, Complex*, const int&, double*, int&); @@ -98,23 +98,23 @@ // implicit double precision (a-h,o-z) statement at the beginning of // each subroutine. - int F77_FCN (cffti, CFFTI) (const int&, Complex*); - - int F77_FCN (cfftf, CFFTF) (const int&, Complex*, Complex*); - - int F77_FCN (cfftb, CFFTB) (const int&, Complex*, Complex*); - - int F77_FCN (zlartg, ZLARTG) (const Complex&, const Complex&, + int F77_FUNC (cffti, CFFTI) (const int&, Complex*); + + int F77_FUNC (cfftf, CFFTF) (const int&, Complex*, Complex*); + + int F77_FUNC (cfftb, CFFTB) (const int&, Complex*, Complex*); + + int F77_FUNC (zlartg, ZLARTG) (const Complex&, const Complex&, double&, Complex&, Complex&); - int F77_FCN (ztrsyl, ZTRSYL) (const char*, const char*, const int&, + int F77_FUNC (ztrsyl, ZTRSYL) (const char*, const char*, const int&, const int&, const int&, const Complex*, const int&, const Complex*, const int&, const Complex*, const int&, double&, int&, long, long); - int F77_FCN (xzlange, XZLANGE) (const char*, const int&, + int F77_FUNC (xzlange, XZLANGE) (const char*, const int&, const int&, const Complex*, const int&, double*, double&); } @@ -1083,10 +1083,10 @@ retval = *this; Complex *tmp_data = retval.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) - F77_FCN (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); + F77_FUNC (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); return retval; } @@ -1120,10 +1120,10 @@ retval = *this; Complex *tmp_data = retval.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) - F77_FCN (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); + F77_FUNC (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); for (int j = 0; j < npts*nsamples; j++) tmp_data[j] = tmp_data[j] / static_cast<double> (npts); @@ -1160,10 +1160,10 @@ retval = *this; Complex *tmp_data = retval.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) - F77_FCN (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); + F77_FUNC (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); npts = nc; nsamples = nr; @@ -1175,14 +1175,14 @@ Array<Complex> row (npts); Complex *prow = row.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) { for (int i = 0; i < npts; i++) prow[i] = tmp_data[i*nr + j]; - F77_FCN (cfftf, CFFTF) (npts, prow, pwsave); + F77_FUNC (cfftf, CFFTF) (npts, prow, pwsave); for (int i = 0; i < npts; i++) tmp_data[i*nr + j] = prow[i]; @@ -1220,10 +1220,10 @@ retval = *this; Complex *tmp_data = retval.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) - F77_FCN (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); + F77_FUNC (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); for (int j = 0; j < npts*nsamples; j++) tmp_data[j] = tmp_data[j] / static_cast<double> (npts); @@ -1238,14 +1238,14 @@ Array<Complex> row (npts); Complex *prow = row.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) { for (int i = 0; i < npts; i++) prow[i] = tmp_data[i*nr + j]; - F77_FCN (cfftb, CFFTB) (npts, prow, pwsave); + F77_FUNC (cfftb, CFFTB) (npts, prow, pwsave); for (int i = 0; i < npts; i++) tmp_data[i*nr + j] = prow[i] / static_cast<double> (npts); @@ -2862,7 +2862,7 @@ double cc; Complex cs, temp_r; - F77_FCN (zlartg, ZLARTG) (x, y, cc, cs, temp_r); + F77_FUNC (zlartg, ZLARTG) (x, y, cc, cs, temp_r); ComplexMatrix g (2, 2);
--- a/liboctave/CRowVector.cc +++ b/liboctave/CRowVector.cc @@ -41,7 +41,7 @@ extern "C" { - int F77_FCN (zgemv, ZGEMV) (const char*, const int&, const int&, + int F77_FUNC (zgemv, ZGEMV) (const char*, const int&, const int&, const Complex&, const Complex*, const int&, const Complex*, const int&, const Complex&, Complex*, const int&,
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,23 @@ +2002-04-03 Steven G. Johnson <stevenj@alum.mit.edu> + + * f2c-main.c (MAIN_, MAIN__): Delete. Use F77_DUMMY_MAIN instead. + * file-stat.cc (file_stat::update_internal, file_stat::copy): + Use HAVE_STRUCT_STAT_ST_RDEV instead of HAVE_ST_RDEV. + Use HAVE_STRUCT_STAT_ST_BLKSIZE instead of HAVE_ST_BLKSIZE. + Use HAVE_STRUCT_STAT_ST_BLOCKS instead of HAVE_ST_BLOCKS. + * file-stat.h: Likewise. + * oct-time.cc (octave_time::octave_time, octave_base_tm::strftime, + octave_base_tm::init, octave_strptime::init): Use HAVE_TM_ZONE + instead of HAVE_STRUCT_TM_TM_ZONE. + * strftime.c: Likewise. + * lo-specfun.cc, mach-info.cc, CColVector.cc, CMatrix.cc, + CRowVector.cc, CmplxAEPBAL.cc, CmplxCHOL.cc, CmplxHESS.cc, + CmplxLU.cc, CmplxQR.cc, CmplxQRP.cc, CmplxSCHUR.cc, CmplxSVD.cc, + CollocWt.cc, DASSL.cc, EIG.cc, LSODE.cc, NLEqn.cc, Quad.cc, + dColVector.cc, dMatrix.cc, dRowVector.cc, dbleAEPBAL.cc, + dbleCHOL.cc, dbleHESS.cc, dbleLU.cc, dbleQR.cc, dbleQRP.cc, + dbleSCHUR.cc, dbleSVD.cc: Use F77_FUNC instead of F77_FCN. + 2002-04-02 Paul Kienzle <pkienzle@users.sf.net> * CmplxQR.cc (ComplexQR::init): Use economy QR decomposition
--- a/liboctave/CmplxAEPBAL.cc +++ b/liboctave/CmplxAEPBAL.cc @@ -36,11 +36,11 @@ extern "C" { - int F77_FCN (zgebal, ZGEBAL) (const char*, const int&, Complex*, + int F77_FUNC (zgebal, ZGEBAL) (const char*, const int&, Complex*, const int&, int&, int&, double*, int&, long, long); - int F77_FCN (zgebak, ZGEBAK) (const char*, const char*, const int&, + int F77_FUNC (zgebak, ZGEBAK) (const char*, const char*, const int&, const int&, const int&, double*, const int&, Complex*, const int&, int&, long, long);
--- a/liboctave/CmplxCHOL.cc +++ b/liboctave/CmplxCHOL.cc @@ -34,7 +34,7 @@ extern "C" { - int F77_FCN (zpotrf, ZPOTRF) (const char*, const int&, Complex*, + int F77_FUNC (zpotrf, ZPOTRF) (const char*, const int&, Complex*, const int&, int&, long); }
--- a/liboctave/CmplxHESS.cc +++ b/liboctave/CmplxHESS.cc @@ -34,20 +34,20 @@ extern "C" { - int F77_FCN (zgebal, ZGEBAL) (const char*, const int&, Complex*, + int F77_FUNC (zgebal, ZGEBAL) (const char*, const int&, Complex*, const int&, int&, int&, double*, int&, long, long); - int F77_FCN (zgehrd, ZGEHRD) (const int&, const int&, const int&, + int F77_FUNC (zgehrd, ZGEHRD) (const int&, const int&, const int&, Complex*, const int&, Complex*, Complex*, const int&, int&, long, long); - int F77_FCN (zunghr, ZUNGHR) (const int&, const int&, const int&, + int F77_FUNC (zunghr, ZUNGHR) (const int&, const int&, const int&, Complex*, const int&, Complex*, Complex*, const int&, int&, long, long); - int F77_FCN (zgebak, ZGEBAK) (const char*, const char*, const int&, + int F77_FUNC (zgebak, ZGEBAK) (const char*, const char*, const int&, const int&, const int&, double*, const int&, Complex*, const int&, int&, long, long);
--- a/liboctave/CmplxLU.cc +++ b/liboctave/CmplxLU.cc @@ -43,7 +43,7 @@ extern "C" { - int F77_FCN (zgetrf, ZGETRF) (const int&, const int&, Complex*, + int F77_FUNC (zgetrf, ZGETRF) (const int&, const int&, Complex*, const int&, int*, int&); }
--- a/liboctave/CmplxQR.cc +++ b/liboctave/CmplxQR.cc @@ -34,11 +34,11 @@ extern "C" { - int F77_FCN (zgeqrf, ZGEQRF) (const int&, const int&, Complex*, + int F77_FUNC (zgeqrf, ZGEQRF) (const int&, const int&, Complex*, const int&, Complex*, Complex*, const int&, int&); - int F77_FCN (zungqr, ZUNGQR) (const int&, const int&, const int&, + int F77_FUNC (zungqr, ZUNGQR) (const int&, const int&, const int&, Complex*, const int&, Complex*, Complex*, const int&, int&); }
--- a/liboctave/CmplxQRP.cc +++ b/liboctave/CmplxQRP.cc @@ -36,11 +36,11 @@ extern "C" { - int F77_FCN (zgeqpf, ZGEQPF) (const int&, const int&, Complex*, + int F77_FUNC (zgeqpf, ZGEQPF) (const int&, const int&, Complex*, const int&, int*, Complex*, Complex*, double*, int&); - int F77_FCN (zungqr, ZUNGQR) (const int&, const int&, const int&, + int F77_FUNC (zungqr, ZUNGQR) (const int&, const int&, const int&, Complex*, const int&, Complex*, Complex*, const int&, int&); }
--- a/liboctave/CmplxSCHUR.cc +++ b/liboctave/CmplxSCHUR.cc @@ -34,7 +34,7 @@ extern "C" { - int F77_FCN (zgeesx, ZGEESX) (const char*, const char*, + int F77_FUNC (zgeesx, ZGEESX) (const char*, const char*, ComplexSCHUR::select_function, const char*, const int&, Complex*, const int&, int&, Complex*, Complex*,
--- a/liboctave/CmplxSVD.cc +++ b/liboctave/CmplxSVD.cc @@ -34,7 +34,7 @@ extern "C" { - int F77_FCN (zgesvd, ZGESVD) (const char*, const char*, const int&, + int F77_FUNC (zgesvd, ZGESVD) (const char*, const char*, const int&, const int&, Complex*, const int&, double*, Complex*, const int&, Complex*, const int&, Complex*,
--- a/liboctave/CollocWt.cc +++ b/liboctave/CollocWt.cc @@ -36,11 +36,11 @@ extern "C" { - int F77_FCN (jcobi, JCOBI) (int&, int&, int&, int&, double&, + int F77_FUNC (jcobi, JCOBI) (int&, int&, int&, int&, double&, double&, double*, double*, double*, double*); - int F77_FCN (dfopr, DFOPR) (int&, int&, int&, int&, int&, int&, + int F77_FUNC (dfopr, DFOPR) (int&, int&, int&, int&, int&, int&, double*, double*, double*, double*, double*); } @@ -124,7 +124,7 @@ // Compute roots. - F77_FCN (jcobi, JCOBI) (nt, n, inc_left, inc_right, Alpha, Beta, + F77_FUNC (jcobi, JCOBI) (nt, n, inc_left, inc_right, Alpha, Beta, pdif1, pdif2, pdif3, pr); int id; @@ -134,7 +134,7 @@ id = 1; for (int i = 1; i <= nt; i++) { - F77_FCN (dfopr, DFOPR) (nt, n, inc_left, inc_right, i, id, pdif1, + F77_FUNC (dfopr, DFOPR) (nt, n, inc_left, inc_right, i, id, pdif1, pdif2, pdif3, pr, pvect); for (int j = 0; j < nt; j++) @@ -146,7 +146,7 @@ id = 2; for (int i = 1; i <= nt; i++) { - F77_FCN (dfopr, DFOPR) (nt, n, inc_left, inc_right, i, id, pdif1, + F77_FUNC (dfopr, DFOPR) (nt, n, inc_left, inc_right, i, id, pdif1, pdif2, pdif3, pr, pvect); for (int j = 0; j < nt; j++) @@ -157,7 +157,7 @@ id = 3; double *pq = q.fortran_vec (); - F77_FCN (dfopr, DFOPR) (nt, n, inc_left, inc_right, id, id, pdif1, + F77_FUNC (dfopr, DFOPR) (nt, n, inc_left, inc_right, id, id, pdif1, pdif2, pdif3, pr, pq); initialized = 1;
--- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -42,7 +42,7 @@ double*, const double&, double*, int*); extern "C" -int F77_FCN (ddassl, DDASSL) (dassl_fcn_ptr, const int&, double&, +int F77_FUNC (ddassl, DDASSL) (dassl_fcn_ptr, const int&, double&, double*, double*, double&, const int*, const double&, const double&, int&, double*, const int&, int*, const int&,
--- a/liboctave/EIG.cc +++ b/liboctave/EIG.cc @@ -35,23 +35,23 @@ extern "C" { - int F77_FCN (dgeev, DGEEV) (const char*, const char*, const int&, + int F77_FUNC (dgeev, DGEEV) (const char*, const char*, const int&, double*, const int&, double*, double*, double*, const int&, double*, const int&, double*, const int&, int&, long, long); - int F77_FCN (zgeev, ZGEEV) (const char*, const char*, const int&, + int F77_FUNC (zgeev, ZGEEV) (const char*, const char*, const int&, Complex*, const int&, Complex*, Complex*, const int&, Complex*, const int&, Complex*, const int&, double*, int&, long, long); - int F77_FCN (dsyev, DSYEV) (const char*, const char*, const int&, + int F77_FUNC (dsyev, DSYEV) (const char*, const char*, const int&, double*, const int&, double*, double*, const int&, int&, long, long); - int F77_FCN (zheev, ZHEEV) (const char*, const char*, const int&, + int F77_FUNC (zheev, ZHEEV) (const char*, const char*, const int&, Complex*, const int&, double*, Complex*, const int&, double*, int&, long, long); }
--- a/liboctave/LSODE.cc +++ b/liboctave/LSODE.cc @@ -45,7 +45,7 @@ int&); extern "C" -int F77_FCN (lsode, LSODE) (lsode_fcn_ptr, int&, double*, double&, +int F77_FUNC (lsode, LSODE) (lsode_fcn_ptr, int&, double*, double&, double&, int&, double&, double&, int&, int&, int&, double*, int&, int*, int&, lsode_jac_ptr, int&);
--- a/liboctave/NLEqn.cc +++ b/liboctave/NLEqn.cc @@ -36,14 +36,14 @@ typedef int (*hybrd1_fcn_ptr) (int*, double*, double*, int*); extern "C" -int F77_FCN (hybrd1, HYBRD1) (hybrd1_fcn_ptr, const int&, double*, +int F77_FUNC (hybrd1, HYBRD1) (hybrd1_fcn_ptr, const int&, double*, double*, const double&, int&, double*, const int&); typedef int (*hybrj1_fcn_ptr) (int*, double*, double*, double*, int*, int*); extern "C" -int F77_FCN (hybrj1, HYBRJ1) (hybrj1_fcn_ptr, const int&, double*, +int F77_FUNC (hybrj1, HYBRJ1) (hybrj1_fcn_ptr, const int&, double*, double*, double*, const int&, const double&, int&, double*, const int&);
--- a/liboctave/Quad.cc +++ b/liboctave/Quad.cc @@ -44,14 +44,14 @@ typedef int (*quad_fcn_ptr) (double*, int&, double*); extern "C" -int F77_FCN (dqagp, DQAGP) (quad_fcn_ptr, const double&, const double&, +int F77_FUNC (dqagp, DQAGP) (quad_fcn_ptr, const double&, const double&, const int&, const double*, const double&, const double&, double&, double&, int&, int&, const int&, const int&, int&, int*, double*); extern "C" -int F77_FCN (dqagi, DQAGI) (quad_fcn_ptr, const double&, const int&, +int F77_FUNC (dqagi, DQAGI) (quad_fcn_ptr, const double&, const int&, const double&, const double&, double&, double&, int&, int&, const int&, const int&, int&, int*, double*);
--- a/liboctave/dColVector.cc +++ b/liboctave/dColVector.cc @@ -41,7 +41,7 @@ extern "C" { - int F77_FCN (dgemv, DGEMV) (const char*, const int&, const int&, + int F77_FUNC (dgemv, DGEMV) (const char*, const int&, const int&, const double&, const double*, const int&, const double*, const int&, const double&, double*, const int&,
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -58,33 +58,33 @@ extern "C" { - int F77_FCN (dgebal, DGEBAL) (const char*, const int&, double*, + int F77_FUNC (dgebal, DGEBAL) (const char*, const int&, double*, const int&, int&, int&, double*, int&, long, long); - int F77_FCN (dgebak, DGEBAK) (const char*, const char*, const int&, + int F77_FUNC (dgebak, DGEBAK) (const char*, const char*, const int&, const int&, const int&, double*, const int&, double*, const int&, int&, long, long); - int F77_FCN (dgemm, DGEMM) (const char*, const char*, const int&, + int F77_FUNC (dgemm, DGEMM) (const char*, const char*, const int&, const int&, const int&, const double&, const double*, const int&, const double*, const int&, const double&, double*, const int&, long, long); - int F77_FCN (dgeco, DGECO) (double*, const int&, const int&, int*, + int F77_FUNC (dgeco, DGECO) (double*, const int&, const int&, int*, double&, double*); - int F77_FCN (dgesl, DGESL) (const double*, const int&, const int&, + int F77_FUNC (dgesl, DGESL) (const double*, const int&, const int&, const int*, double*, const int&); - int F77_FCN (dgedi, DGEDI) (double*, const int&, const int&, + int F77_FUNC (dgedi, DGEDI) (double*, const int&, const int&, const int*, double*, double*, const int&); - int F77_FCN (dgelss, DGELSS) (const int&, const int&, const int&, + int F77_FUNC (dgelss, DGELSS) (const int&, const int&, const int&, double*, const int&, double*, const int&, double*, double&, int&, double*, const int&, int&); @@ -94,22 +94,22 @@ // implicit double precision (a-h,o-z) statement at the beginning of // each subroutine. - int F77_FCN (cffti, CFFTI) (const int&, Complex*); - - int F77_FCN (cfftf, CFFTF) (const int&, Complex*, Complex*); - - int F77_FCN (cfftb, CFFTB) (const int&, Complex*, Complex*); - - int F77_FCN (dlartg, DLARTG) (const double&, const double&, double&, + int F77_FUNC (cffti, CFFTI) (const int&, Complex*); + + int F77_FUNC (cfftf, CFFTF) (const int&, Complex*, Complex*); + + int F77_FUNC (cfftb, CFFTB) (const int&, Complex*, Complex*); + + int F77_FUNC (dlartg, DLARTG) (const double&, const double&, double&, double&, double&); - int F77_FCN (dtrsyl, DTRSYL) (const char*, const char*, const int&, + int F77_FUNC (dtrsyl, DTRSYL) (const char*, const char*, const int&, const int&, const int&, const double*, const int&, const double*, const int&, const double*, const int&, double&, int&, long, long); - int F77_FCN (xdlange, XDLANGE) (const char*, const int&, + int F77_FUNC (xdlange, XDLANGE) (const char*, const int&, const int&, const double*, const int&, double*, double&); } @@ -779,10 +779,10 @@ retval = ComplexMatrix (*this); Complex *tmp_data = retval.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) - F77_FCN (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); + F77_FUNC (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); return retval; } @@ -816,10 +816,10 @@ retval = ComplexMatrix (*this); Complex *tmp_data = retval.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) - F77_FCN (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); + F77_FUNC (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); for (int j = 0; j < npts*nsamples; j++) tmp_data[j] = tmp_data[j] / static_cast<double> (npts); @@ -856,10 +856,10 @@ retval = ComplexMatrix (*this); Complex *tmp_data = retval.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) - F77_FCN (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); + F77_FUNC (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); npts = nc; nsamples = nr; @@ -871,14 +871,14 @@ Array<Complex> row (npts); Complex *prow = row.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) { for (int i = 0; i < npts; i++) prow[i] = tmp_data[i*nr + j]; - F77_FCN (cfftf, CFFTF) (npts, prow, pwsave); + F77_FUNC (cfftf, CFFTF) (npts, prow, pwsave); for (int i = 0; i < npts; i++) tmp_data[i*nr + j] = prow[i]; @@ -916,10 +916,10 @@ retval = ComplexMatrix (*this); Complex *tmp_data = retval.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) - F77_FCN (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); + F77_FUNC (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); for (int j = 0; j < npts*nsamples; j++) tmp_data[j] = tmp_data[j] / static_cast<double> (npts); @@ -934,14 +934,14 @@ Array<Complex> row (npts); Complex *prow = row.fortran_vec (); - F77_FCN (cffti, CFFTI) (npts, pwsave); + F77_FUNC (cffti, CFFTI) (npts, pwsave); for (int j = 0; j < nsamples; j++) { for (int i = 0; i < npts; i++) prow[i] = tmp_data[i*nr + j]; - F77_FCN (cfftb, CFFTB) (npts, prow, pwsave); + F77_FUNC (cfftb, CFFTB) (npts, prow, pwsave); for (int i = 0; i < npts; i++) tmp_data[i*nr + j] = prow[i] / static_cast<double> (npts); @@ -2848,7 +2848,7 @@ { double cc, s, temp_r; - F77_FCN (dlartg, DLARTG) (x, y, cc, s, temp_r); + F77_FUNC (dlartg, DLARTG) (x, y, cc, s, temp_r); Matrix g (2, 2);
--- a/liboctave/dRowVector.cc +++ b/liboctave/dRowVector.cc @@ -41,13 +41,13 @@ extern "C" { - int F77_FCN (dgemv, DGEMV) (const char*, const int&, const int&, + int F77_FUNC (dgemv, DGEMV) (const char*, const int&, const int&, const double&, const double*, const int&, const double*, const int&, const double&, double*, const int&, long); - double F77_FCN (ddot, DDOT) (const int&, const double*, const int&, + double F77_FUNC (ddot, DDOT) (const int&, const double*, const int&, const double*, const int&); } @@ -338,7 +338,7 @@ if (len != a_len) gripe_nonconformant ("operator *", len, a_len); else if (len != 0) - retval = F77_FCN (ddot, DDOT) (len, v.data (), 1, a.data (), 1); + retval = F77_FUNC (ddot, DDOT) (len, v.data (), 1, a.data (), 1); return retval; }
--- a/liboctave/dbleAEPBAL.cc +++ b/liboctave/dbleAEPBAL.cc @@ -35,11 +35,11 @@ extern "C" { - int F77_FCN (dgebal, DGEBAL) (const char*, const int&, double*, + int F77_FUNC (dgebal, DGEBAL) (const char*, const int&, double*, const int&, int&, int&, double*, int&, long, long); - int F77_FCN (dgebak, DGEBAK) (const char*, const char*, const int&, + int F77_FUNC (dgebak, DGEBAK) (const char*, const char*, const int&, const int&, const int&, double*, const int&, double*, const int&, int&, long, long);
--- a/liboctave/dbleCHOL.cc +++ b/liboctave/dbleCHOL.cc @@ -34,7 +34,7 @@ extern "C" { - int F77_FCN (dpotrf, DPOTRF) (const char*, const int&, double*, + int F77_FUNC (dpotrf, DPOTRF) (const char*, const int&, double*, const int&, int&, long); }
--- a/liboctave/dbleHESS.cc +++ b/liboctave/dbleHESS.cc @@ -34,19 +34,19 @@ extern "C" { - int F77_FCN (dgebal, DGEBAL) (const char*, const int&, double*, + int F77_FUNC (dgebal, DGEBAL) (const char*, const int&, double*, const int&, int&, int&, double*, int&, long, long); - int F77_FCN (dgehrd, DGEHRD) (const int&, const int&, const int&, + int F77_FUNC (dgehrd, DGEHRD) (const int&, const int&, const int&, double*, const int&, double*, double*, const int&, int&, long, long); - int F77_FCN (dorghr, DORGHR) (const int&, const int&, const int&, + int F77_FUNC (dorghr, DORGHR) (const int&, const int&, const int&, double*, const int&, double*, double*, const int&, int&, long, long); - int F77_FCN (dgebak, DGEBAK) (const char*, const char*, const int&, + int F77_FUNC (dgebak, DGEBAK) (const char*, const char*, const int&, const int&, const int&, double*, const int&, double*, const int&, int&, long, long);
--- a/liboctave/dbleLU.cc +++ b/liboctave/dbleLU.cc @@ -43,7 +43,7 @@ extern "C" { - int F77_FCN (dgetrf, DGETRF) (const int&, const int&, double*, + int F77_FUNC (dgetrf, DGETRF) (const int&, const int&, double*, const int&, int*, int&); }
--- a/liboctave/dbleQR.cc +++ b/liboctave/dbleQR.cc @@ -34,11 +34,11 @@ extern "C" { - int F77_FCN (dgeqrf, DGEQRF) (const int&, const int&, double*, + int F77_FUNC (dgeqrf, DGEQRF) (const int&, const int&, double*, const int&, double*, double*, const int&, int&); - int F77_FCN (dorgqr, DORGQR) (const int&, const int&, const int&, + int F77_FUNC (dorgqr, DORGQR) (const int&, const int&, const int&, double*, const int&, double*, double*, const int&, int&); }
--- a/liboctave/dbleQRP.cc +++ b/liboctave/dbleQRP.cc @@ -36,11 +36,11 @@ extern "C" { - int F77_FCN (dgeqpf, DGEQPF) (const int&, const int&, double*, + int F77_FUNC (dgeqpf, DGEQPF) (const int&, const int&, double*, const int&, int*, double*, double*, int&); - int F77_FCN (dorgqr, DORGQR) (const int&, const int&, const int&, + int F77_FUNC (dorgqr, DORGQR) (const int&, const int&, const int&, double*, const int&, double*, double*, const int&, int&); }
--- a/liboctave/dbleSCHUR.cc +++ b/liboctave/dbleSCHUR.cc @@ -36,7 +36,7 @@ extern "C" { - int F77_FCN (dgeesx, DGEESX) (const char*, const char*, + int F77_FUNC (dgeesx, DGEESX) (const char*, const char*, SCHUR::select_function, const char*, const int&, double*, const int&, int&, double*, double*, double*,
--- a/liboctave/dbleSVD.cc +++ b/liboctave/dbleSVD.cc @@ -35,7 +35,7 @@ extern "C" { - int F77_FCN (dgesvd, DGESVD) (const char*, const char*, const int&, + int F77_FUNC (dgesvd, DGESVD) (const char*, const char*, const int&, const int&, double*, const int&, double*, double*, const int&, double*, const int&, double*, const int&, int&,
--- a/liboctave/f2c-main.c +++ b/liboctave/f2c-main.c @@ -22,24 +22,16 @@ #include <assert.h> -/* I think that this is really only needed if linking to Fortran - compiled libraries on a Sun. It also seems to be needed on - some Linux/ELF systems with g77. It should never be called. */ + +/* Dummy Fortran main declaration, needed in order to link to some + Fortran libraries. See the AC_F77_DUMMY_MAIN macro documentation. + This function should never be called. */ -#if defined (sun) -int -MAIN_ () -{ - assert (0); - return 0; -} -#elif defined (__linux__) -int -MAIN__ () -{ - assert (0); - return 0; -} +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus +extern "C" +# endif +int F77_DUMMY_MAIN() { assert(0); return 1; } #endif /*
--- a/liboctave/file-stat.cc +++ b/liboctave/file-stat.cc @@ -180,15 +180,15 @@ fs_mtime = buf.st_mtime; fs_ctime = buf.st_ctime; -#if defined (HAVE_ST_RDEV) +#if defined (HAVE_STRUCT_STAT_ST_RDEV) fs_rdev = buf.st_rdev; #endif -#if defined (HAVE_ST_BLKSIZE) +#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE) fs_blksize = buf.st_blksize; #endif -#if defined (HAVE_ST_BLOCKS) +#if defined (HAVE_STRUCT_STAT_ST_BLOCKS) fs_blocks = buf.st_blocks; #endif } @@ -216,15 +216,15 @@ fs_mtime = fs.fs_mtime; fs_ctime = fs.fs_ctime; -#if defined (HAVE_ST_RDEV) +#if defined (HAVE_STRUCT_STAT_ST_RDEV) fs_rdev = fs.fs_rdev; #endif -#if defined (HAVE_ST_BLKSIZE) +#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE) fs_blksize = fs.fs_blksize; #endif -#if defined (HAVE_ST_BLOCKS) +#if defined (HAVE_STRUCT_STAT_ST_BLOCKS) fs_blocks = fs.fs_blocks; #endif }
--- a/liboctave/file-stat.h +++ b/liboctave/file-stat.h @@ -98,15 +98,15 @@ octave_time mtime (void) const { return fs_mtime; } octave_time ctime (void) const { return fs_ctime; } -#if defined (HAVE_ST_RDEV) +#if defined (HAVE_STRUCT_STAT_ST_RDEV) dev_t rdev (void) const { return fs_rdev; } #endif -#if defined (HAVE_ST_BLKSIZE) +#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE) long blksize (void) const { return fs_blksize; } #endif -#if defined (HAVE_ST_BLOCKS) +#if defined (HAVE_STRUCT_STAT_ST_BLOCKS) long blocks (void) const { return fs_blocks; } #endif @@ -175,17 +175,17 @@ // time of last file status change octave_time fs_ctime; -#if defined (HAVE_ST_RDEV) +#if defined (HAVE_STRUCT_STAT_ST_RDEV) // device number for special files dev_t fs_rdev; #endif -#if defined (HAVE_ST_BLKSIZE) +#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE) // best I/O block size long fs_blksize; #endif -#if defined (HAVE_ST_BLOCKS) +#if defined (HAVE_STRUCT_STAT_ST_BLOCKS) // number of 512-byte blocks allocated long fs_blocks; #endif
--- a/liboctave/lo-specfun.cc +++ b/liboctave/lo-specfun.cc @@ -37,53 +37,53 @@ extern "C" { - int F77_FCN (zbesj, ZBESJ) (const double&, const double&, + int F77_FUNC (zbesj, ZBESJ) (const double&, const double&, const double&, const int&, const int&, double*, double*, int&, int&); - int F77_FCN (zbesy, ZBESY) (const double&, const double&, + int F77_FUNC (zbesy, ZBESY) (const double&, const double&, const double&, const int&, const int&, double*, double*, int&, double*, double*, int&); - int F77_FCN (zbesi, ZBESI) (const double&, const double&, + int F77_FUNC (zbesi, ZBESI) (const double&, const double&, const double&, const int&, const int&, double*, double*, int&, int&); - int F77_FCN (zbesk, ZBESK) (const double&, const double&, + int F77_FUNC (zbesk, ZBESK) (const double&, const double&, const double&, const int&, const int&, double*, double*, int&, int&); - int F77_FCN (zbesh, ZBESH) (const double&, const double&, + int F77_FUNC (zbesh, ZBESH) (const double&, const double&, const double&, const int&, const int&, const int&, double*, double*, int&, int&); - int F77_FCN (zairy, ZAIRY) (const double&, const double&, + int F77_FUNC (zairy, ZAIRY) (const double&, const double&, const int&, const int&, double&, double&, int&, int&); - int F77_FCN (zbiry, ZBIRY) (const double&, const double&, + int F77_FUNC (zbiry, ZBIRY) (const double&, const double&, const int&, const int&, double&, double&, int&); - int F77_FCN (xdacosh, XDACOSH) (const double&, double&); + int F77_FUNC (xdacosh, XDACOSH) (const double&, double&); - int F77_FCN (xdasinh, XDASINH) (const double&, double&); + int F77_FUNC (xdasinh, XDASINH) (const double&, double&); - int F77_FCN (xdatanh, XDATANH) (const double&, double&); + int F77_FUNC (xdatanh, XDATANH) (const double&, double&); - int F77_FCN (xderf, XDERF) (const double&, double&); + int F77_FUNC (xderf, XDERF) (const double&, double&); - int F77_FCN (xderfc, XDERFC) (const double&, double&); + int F77_FUNC (xderfc, XDERFC) (const double&, double&); - int F77_FCN (xdbetai, XDBETAI) (const double&, const double&, + int F77_FUNC (xdbetai, XDBETAI) (const double&, const double&, const double&, double&); - int F77_FCN (xdgamma, XDGAMMA) (const double&, double&); + int F77_FUNC (xdgamma, XDGAMMA) (const double&, double&); - int F77_FCN (xdgamit, XDGAMIT) (const double&, const double&, double&); + int F77_FUNC (xdgamit, XDGAMIT) (const double&, const double&, double&); - int F77_FCN (dlgams, DLGAMS) (const double&, double&, double&); + int F77_FUNC (dlgams, DLGAMS) (const double&, double&, double&); } #if !defined (HAVE_ACOSH) @@ -213,7 +213,7 @@ double zr = z.real (); double zi = z.imag (); - F77_FCN (zbesj, ZBESJ) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); + F77_FUNC (zbesj, ZBESJ) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); if (zi == 0.0 && zr > 0.0) yi = 0.0; @@ -265,7 +265,7 @@ } else { - F77_FCN (zbesy, ZBESY) (zr, zi, alpha, kode, 1, &yr, &yi, nz, + F77_FUNC (zbesy, ZBESY) (zr, zi, alpha, kode, 1, &yr, &yi, nz, &wr, &wi, ierr); if (zi == 0.0 && zr > 0.0) @@ -308,7 +308,7 @@ double zr = z.real (); double zi = z.imag (); - F77_FCN (zbesi, ZBESI) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); + F77_FUNC (zbesi, ZBESI) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); if (zi == 0.0 && zr > 0.0) yi = 0.0; @@ -359,7 +359,7 @@ } else { - F77_FCN (zbesk, ZBESK) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); + F77_FUNC (zbesk, ZBESK) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); if (zi == 0.0 && zr > 0.0) yi = 0.0; @@ -392,7 +392,7 @@ double zr = z.real (); double zi = z.imag (); - F77_FCN (zbesh, ZBESH) (zr, zi, alpha, kode, 1, 1, &yr, &yi, nz, ierr); + F77_FUNC (zbesh, ZBESH) (zr, zi, alpha, kode, 1, 1, &yr, &yi, nz, ierr); retval = bessel_return_value (Complex (yr, yi), ierr); } @@ -425,7 +425,7 @@ double zr = z.real (); double zi = z.imag (); - F77_FCN (zbesh, ZBESH) (zr, zi, alpha, kode, 2, 1, &yr, &yi, nz, ierr); + F77_FUNC (zbesh, ZBESH) (zr, zi, alpha, kode, 2, 1, &yr, &yi, nz, ierr); retval = bessel_return_value (Complex (yr, yi), ierr); } @@ -610,7 +610,7 @@ int kode = scaled ? 2 : 1; - F77_FCN (zairy, ZAIRY) (zr, zi, id, kode, ar, ai, nz, ierr); + F77_FUNC (zairy, ZAIRY) (zr, zi, id, kode, ar, ai, nz, ierr); if (zi == 0.0 && (! scaled || zr > 0.0)) ai = 0.0; @@ -631,7 +631,7 @@ int kode = scaled ? 2 : 1; - F77_FCN (zbiry, ZBIRY) (zr, zi, id, kode, ar, ai, ierr); + F77_FUNC (zbiry, ZBIRY) (zr, zi, id, kode, ar, ai, ierr); if (zi == 0.0 && (! scaled || zr > 0.0)) ai = 0.0;
--- a/liboctave/mach-info.cc +++ b/liboctave/mach-info.cc @@ -30,7 +30,7 @@ extern "C" { - double F77_FCN (d1mach, D1MACH) (const int&); + double F77_FUNC (d1mach, D1MACH) (const int&); } oct_mach_info *oct_mach_info::instance = 0; @@ -106,10 +106,10 @@ equiv mach_fp_par[4]; - mach_fp_par[0].d = F77_FCN (d1mach, D1MACH) (1); - mach_fp_par[1].d = F77_FCN (d1mach, D1MACH) (2); - mach_fp_par[2].d = F77_FCN (d1mach, D1MACH) (3); - mach_fp_par[3].d = F77_FCN (d1mach, D1MACH) (4); + mach_fp_par[0].d = F77_FUNC (d1mach, D1MACH) (1); + mach_fp_par[1].d = F77_FUNC (d1mach, D1MACH) (2); + mach_fp_par[2].d = F77_FUNC (d1mach, D1MACH) (3); + mach_fp_par[3].d = F77_FUNC (d1mach, D1MACH) (4); int i = 0; do
--- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -52,7 +52,7 @@ t.tm_yday = tm.yday (); t.tm_isdst = tm.isdst (); -#if defined (HAVE_TM_ZONE) +#if defined (HAVE_STRUCT_TM_TM_ZONE) std::string s = tm.zone (); char *ps = strsave (s.c_str ()); t.tm_zone = ps; @@ -60,7 +60,7 @@ ot_unix_time = mktime (&t); -#if defined (HAVE_TM_ZONE) +#if defined (HAVE_STRUCT_TM_TM_ZONE) delete [] ps; #endif @@ -175,7 +175,7 @@ t.tm_yday = tm_yday; t.tm_isdst = tm_isdst; -#if defined (HAVE_TM_ZONE) +#if defined (HAVE_STRUCT_TM_TM_ZONE) char *ps = strsave (tm_zone.c_str ()); t.tm_zone = ps; #endif @@ -197,7 +197,7 @@ bufsize *= 2; } -#if defined (HAVE_TM_ZONE) +#if defined (HAVE_STRUCT_TM_TM_ZONE) delete [] ps; #endif @@ -224,7 +224,7 @@ tm_yday = t->tm_yday; tm_isdst = t->tm_isdst; -#if defined (HAVE_TM_ZONE) +#if defined (HAVE_STRUCT_TM_TM_ZONE) tm_zone = t->tm_zone; #elif defined (HAVE_TZNAME) if (t->tm_isdst == 0 || t->tm_isdst == 1) @@ -267,7 +267,7 @@ t.tm_yday = 0; t.tm_isdst = 0; -#if defined (HAVE_TM_ZONE) +#if defined (HAVE_STRUCT_TM_TM_ZONE) char *ps = strsave (""); t.tm_zone = ps; #endif @@ -282,7 +282,7 @@ octave_base_tm::init (&t); -#if defined (HAVE_TM_ZONE) +#if defined (HAVE_STRUCT_TM_TM_ZONE) delete ps; #endif }
--- a/liboctave/strftime.c +++ b/liboctave/strftime.c @@ -29,7 +29,7 @@ # define HAVE_MBRLEN 1 # define HAVE_STRUCT_ERA_ENTRY 1 # define HAVE_TM_GMTOFF 1 -# define HAVE_TM_ZONE 1 +# define HAVE_STRUCT_TM_TM_ZONE 1 # define MULTIBYTE_IS_FORMAT_SAFE 1 # define STDC_HEADERS 1 # include <ansidecl.h> @@ -290,7 +290,7 @@ register const char *f; zone = 0; -#if HAVE_TM_ZONE +#if HAVE_STRUCT_TM_TM_ZONE zone = (const char *) tp->tm_zone; #endif #if HAVE_TZNAME
--- a/mkoctfile.in +++ b/mkoctfile.in @@ -41,7 +41,6 @@ : ${FFTW_LIBS=%OCTAVE_CONF_FFTW_LIBS%} : ${LIBS=%OCTAVE_CONF_LIBS%} : ${FLIBS=%OCTAVE_CONF_FLIBS%} -: ${FORTRAN_MAIN_FLAG=%OCTAVE_CONF_FORTRAN_MAIN_FLAG%} : ${LD_CXX=%OCTAVE_CONF_LD_CXX%} : ${LDFLAGS=%OCTAVE_CONF_LDFLAGS%} : ${LD_STATIC_FLAG=%OCTAVE_CONF_LD_STATIC_FLAG%} @@ -53,7 +52,7 @@ : ${ALL_CXXFLAGS="$INCFLAGS $XTRA_CXXFLAGS $CXXFLAGS"} -: ${ALL_LDFLAGS="$FORTRAN_MAIN_FLAG $LD_STATIC_FLAG $CPICFLAG $LDFLAGS"} +: ${ALL_LDFLAGS="$LD_STATIC_FLAG $CPICFLAG $LDFLAGS"} : ${OCTAVE_LIBS="$LIBOCTAVE $LIBOCT_READLINE $SPECIAL_MATH_LIB $LIBCRUFT"} @@ -146,8 +145,6 @@ LDFLAGS LD_STATIC_FLAG RLD_FLAG RDYNAMIC_FLAG - FORTRAN_MAIN_FLAG - LIBOCTAVE LIBOCT_READLINE LIBCRUFT BLAS_LIBS FFTW_LIBS LIBS
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2002-04-03 Steven G. Johnson <stevenj@alum.mit.edu> + + * configure.in: Update for autoconf 2.5x. + 2002-04-03 Paul Kienzle <pkienzle@users.sf.net> * special-matrix/vander.m: Code tidy and vectorize.
--- a/scripts/configure.in +++ b/scripts/configure.in @@ -20,13 +20,14 @@ ### along with Octave; see the file COPYING. If not, write to the Free ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +AC_INIT AC_REVISION() -AC_PREREQ(2.0) -AC_INIT(startup/octaverc) +AC_PREREQ(2.52) +AC_CONFIG_SRCDIR([startup/octaverc]) AC_PROG_INSTALL -AC_OUTPUT(Makefile audio/Makefile control/Makefile control/base/Makefile \ +AC_CONFIG_FILES([Makefile audio/Makefile control/Makefile control/base/Makefile \ control/hinf/Makefile control/obsolete/Makefile \ control/system/Makefile control/util/Makefile elfun/Makefile \ finance/Makefile general/Makefile image/Makefile io/Makefile \ @@ -35,4 +36,5 @@ signal/Makefile specfun/Makefile special-matrix/Makefile \ startup/Makefile statistics/Makefile statistics/base/Makefile \ statistics/distributions/Makefile statistics/models/Makefile \ - statistics/tests/Makefile strings/Makefile time/Makefile) + statistics/tests/Makefile strings/Makefile time/Makefile]) +AC_OUTPUT
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2002-04-03 Steven G. Johnson <stevenj@alum.mit.edu> + + * DLD-FUNCTIONS/balance.cc: Use F77_FUNC instead of F77_FCN. + * DLD-FUNCTIONS/qz.cc: Likewise. + * DLD-FUNCTIONS/rand.cc: Likewise. + * octave.cc: Likewise. + * src/toplev.cc (Foctave_config_info): Delete use of FORTRAN_MAIN_FLAG. + * oct-conf.h.in: Delete use of OCTAVE_CONF_FORTRAN_MAIN_FLAG. + * syscalls.cc (mk_stat_map): + Use HAVE_STRUCT_STAT_ST_RDEV instead of HAVE_ST_RDEV. + Use HAVE_STRUCT_STAT_ST_BLKSIZE instead of HAVE_ST_BLKSIZE. + Use HAVE_STRUCT_STAT_ST_BLOCKS instead of HAVE_ST_BLOCKS. + 2002-04-02 John W. Eaton <jwe@bevo.che.wisc.edu> * lex.l, lex.h (parser_end_of_input): New global variable.
--- a/src/DLD-FUNCTIONS/balance.cc +++ b/src/DLD-FUNCTIONS/balance.cc @@ -42,19 +42,19 @@ extern "C" { - int F77_FCN (dggbal, DGGBAL) (const char* JOB, const int& N, + int F77_FUNC (dggbal, DGGBAL) (const char* JOB, const int& N, double* A, const int& LDA, double* B, const int& LDB, int& ILO, int& IHI, double* LSCALE, double* RSCALE, double* WORK, int& INFO, long); - int F77_FCN (dggbak, DGGBAK) (const char* JOB, const char* SIDE, + int F77_FUNC (dggbak, DGGBAK) (const char* JOB, const char* SIDE, const int& N, const int& ILO, const int& IHI, double* LSCALE, double* RSCALE, int& M, double* V, const int& LDV, int& INFO, long, long); - int F77_FCN (zggbal, ZGGBAL) (const char* JOB, const int& N, + int F77_FUNC (zggbal, ZGGBAL) (const char* JOB, const int& N, Complex* A, const int& LDA, Complex* B, const int& LDB, int& ILO, int& IHI, double* LSCALE, double* RSCALE,
--- a/src/DLD-FUNCTIONS/qz.cc +++ b/src/DLD-FUNCTIONS/qz.cc @@ -59,19 +59,19 @@ extern "C" { - int F77_FCN (dggbal, DGGBAL) (const char* JOB, const int& N, + int F77_FUNC (dggbal, DGGBAL) (const char* JOB, const int& N, double* A, const int& LDA, double* B, const int& LDB, int& ILO, int& IHI, double* LSCALE, double* RSCALE, double* WORK, int& INFO, long); - int F77_FCN (dggbak, DGGBAK) (const char* JOB, const char* SIDE, + int F77_FUNC (dggbak, DGGBAK) (const char* JOB, const char* SIDE, const int& N, const int& ILO, const int& IHI, double* LSCALE, double* RSCALE, int& M, double* V, const int& LDV, int& INFO, long, long); - int F77_FCN (dgghrd, DGGHRD) (const char* COMPQ, const char* COMPZ, + int F77_FUNC (dgghrd, DGGHRD) (const char* COMPQ, const char* COMPZ, const int& N, const int& ILO, const int& IHI, double* A, const int& LDA, double* B, @@ -79,7 +79,7 @@ const int& LDQ, double* Z, const int& LDZ, int& INFO, long, long); - int F77_FCN (dhgeqz, DHGEQZ) (const char* JOB, const char* COMPQ, + int F77_FUNC (dhgeqz, DHGEQZ) (const char* JOB, const char* COMPQ, const char* COMPZ, const int& N, const int& ILO, const int& IHI, double* A, const int& LDA, double* B, @@ -90,14 +90,14 @@ const int& LWORK, int& INFO, long, long, long); - int F77_FCN (dlag2, DLAG2) (double* A, const int& LDA, double* B, + int F77_FUNC (dlag2, DLAG2) (double* A, const int& LDA, double* B, const int& LDB, const double& SAFMIN, double& SCALE1, double& SCALE2, double& WR1, double& WR2, double& WI); // Van Dooren's code (netlib.org: toms/590) for reordering // GEP. Only processes Z, not Q. - int F77_FCN (dsubsp, DSUBSP) (const int& NMAX, const int& N, double* A, + int F77_FUNC (dsubsp, DSUBSP) (const int& NMAX, const int& N, double* A, double* B, double* Z, sort_function, const double& EPS, int& NDIM, int& FAIL, int* IND); @@ -105,7 +105,7 @@ // documentation for DTGEVC incorrectly states that VR, VL are // complex*16; they are declared in DTGEVC as double precision // (probably a cut and paste problem fro ZTGEVC) - int F77_FCN (dtgevc, DTGEVC) (const char* SIDE, const char* HOWMNY, + int F77_FUNC (dtgevc, DTGEVC) (const char* SIDE, const char* HOWMNY, int* SELECT, const int& N, double* A, const int& LDA, double* B, const int& LDB, double* VL, @@ -114,9 +114,9 @@ int& M, double* WORK, int& INFO, long, long); - int F77_FCN (xdlamch, XDLAMCH) (const char* cmach, double& retval, long); + int F77_FUNC (xdlamch, XDLAMCH) (const char* cmach, double& retval, long); - int F77_FCN (xdlange, XDLANGE) (const char*, const int&, + int F77_FUNC (xdlange, XDLANGE) (const char*, const int&, const int&, const double*, const int&, double*, double&); } @@ -284,7 +284,7 @@ } // overflow constant required by dlag2 - F77_FCN (xdlamch, XDLAMCH) ("S", safmin, 1L); + F77_FUNC (xdlamch, XDLAMCH) ("S", safmin, 1L); #ifdef DEBUG_EIG std::cout << "qz: initial value of safmin=" << setiosflags (std::ios::scientific) @@ -299,7 +299,7 @@ std::cout << "qz: DANGER WILL ROBINSON: safmin is 0!" << std::endl; #endif - F77_FCN (xdlamch, XDLAMCH) ("E", safmin, 1L); + F77_FUNC (xdlamch, XDLAMCH) ("E", safmin, 1L); #ifdef DEBUG_EIG std::cout << "qz: safmin set to " << setiosflags (std::ios::scientific)
--- a/src/DLD-FUNCTIONS/rand.cc +++ b/src/DLD-FUNCTIONS/rand.cc @@ -51,19 +51,19 @@ extern "C" { - int F77_FCN (dgennor, DGENNOR) (const double&, const double&, + int F77_FUNC (dgennor, DGENNOR) (const double&, const double&, double&); - int F77_FCN (dgenunf, DGENUNF) (const double&, const double&, + int F77_FUNC (dgenunf, DGENUNF) (const double&, const double&, double&); - int F77_FCN (setall, SETALL) (const int&, const int&); + int F77_FUNC (setall, SETALL) (const int&, const int&); - int F77_FCN (getsd, GETSD) (int&, int&); + int F77_FUNC (getsd, GETSD) (int&, int&); - int F77_FCN (setsd, SETSD) (const int&, const int&); + int F77_FUNC (setsd, SETSD) (const int&, const int&); - int F77_FCN (setcgn, SETCGN) (const int&); + int F77_FUNC (setcgn, SETCGN) (const int&); } static double
--- a/src/oct-conf.h.in +++ b/src/oct-conf.h.in @@ -136,10 +136,6 @@ #define OCTAVE_CONF_FLIBS %OCTAVE_CONF_FLIBS% #endif -#ifndef OCTAVE_CONF_FORTRAN_MAIN_FLAG -#define OCTAVE_CONF_FORTRAN_MAIN_FLAG %OCTAVE_CONF_FORTRAN_MAIN_FLAG% -#endif - #ifndef OCTAVE_CONF_FPICFLAG #define OCTAVE_CONF_FPICFLAG %OCTAVE_CONF_FPICFLAG% #endif
--- a/src/octave.cc +++ b/src/octave.cc @@ -73,7 +73,7 @@ #include <version.h> // Kluge. -extern "C" void F77_FCN (xerbla, XERBLA) (const char *, int); +extern "C" void F77_FUNC (xerbla, XERBLA) (const char *, int); extern void install_builtins (void);
--- a/src/syscalls.cc +++ b/src/syscalls.cc @@ -71,17 +71,17 @@ m["nlink"] = static_cast<double> (fs.nlink ()); m["uid"] = static_cast<double> (fs.uid ()); m["gid"] = static_cast<double> (fs.gid ()); -#if defined (HAVE_ST_RDEV) +#if defined (HAVE_STRUCT_STAT_ST_RDEV) m["rdev"] = static_cast<double> (fs.rdev ()); #endif m["size"] = static_cast<double> (fs.size ()); m["atime"] = static_cast<double> (fs.atime ()); m["mtime"] = static_cast<double> (fs.mtime ()); m["ctime"] = static_cast<double> (fs.ctime ()); -#if defined (HAVE_ST_BLKSIZE) +#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE) m["blksize"] = static_cast<double> (fs.blksize ()); #endif -#if defined (HAVE_ST_BLOCKS) +#if defined (HAVE_STRUCT_STAT_ST_BLOCKS) m["blocks"] = static_cast<double> (fs.blocks ()); #endif
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -673,7 +673,6 @@ m ["FFLAGS"] = OCTAVE_CONF_FFLAGS; m ["FFTW_LIBS"] = OCTAVE_CONF_FFTW_LIBS; m ["FLIBS"] = OCTAVE_CONF_FLIBS; - m ["FORTRAN_MAIN_FLAG"] = OCTAVE_CONF_FORTRAN_MAIN_FLAG; m ["FPICFLAG"] = OCTAVE_CONF_FPICFLAG; m ["GLOB_INCFLAGS"] = OCTAVE_CONF_GLOB_INCFLAGS; m ["INCFLAGS"] = OCTAVE_CONF_INCFLAGS;