diff options
author | Craig Burley <burley@gnu.org> | 1998-06-15 03:52:05 -0400 |
---|---|---|
committer | Dave Love <fx@gcc.gnu.org> | 1998-06-15 07:52:05 +0000 |
commit | f30bc2e7f51160a9fc4b58135b53c16c586e6d56 (patch) | |
tree | dce4e9da3cd43a9dd39543058e1b4927e6b28c02 | |
parent | 95a1b67649114c9f3bb3b1ccc79d06f340d5dd40 (diff) | |
download | gcc-f30bc2e7f51160a9fc4b58135b53c16c586e6d56.zip gcc-f30bc2e7f51160a9fc4b58135b53c16c586e6d56.tar.gz gcc-f30bc2e7f51160a9fc4b58135b53c16c586e6d56.tar.bz2 |
Makefile.in (install): Don't install if $(libsubdir) is empty...
Sat Jun 13 03:46:40 1998 Craig Burley <burley@gnu.org>
* Makefile.in (install): Don't install if $(libsubdir)
is empty; issue a diagnostic saying top-level Makefile
must pass it in instead, and exit.
* Makefile.in (g2c.h): Rename from f2c.h.
* Makefile.in, libF77/Makefile.in, libI77/Makefile.in,
libU77/Makefile.in: Rewrite config and var assignment
sections to be even more minimal than before, and to
more clearly documented what macros are expected to be
set and to what sorts of values. Eliminate CROSS and
related stuff, since there's no such things as CROSS
in egcs. Rename GCC_FOR_TARGET to CC throughout.
* Makefile.in (stamp-libi77, stamp-libf77, stamp-libu77):
Eliminate CROSS.
* configure.in: Eliminate CROSS.
Rename libf2c.a and f2c.h to libg2c.a and g2c.h,
normalize and simplify g77/libg2c build process:
* Makefile.in: Remove all stuff pertaining to
installation, cleaning, and so on. Parent Makefile
does all that now. Pass F2C_H_DIR,
G2C_H_DIR, and GCC_H_DIR, the pathnames for the
directories containing f2c.h, g2c.h, and other
#include files, to subdirectory Makefiles.
(stamp-libf77, stamp-libi77, stamp-libu77):
Don't specify `-f Makefile' anymore, it's not needed
now that subdirectory makefile's from netlib are
renamed to makefile.netlib in g77 source (and to
makefile.ori by configuration process, in case they're
still around somehow).
(stamp-libe77): Don't make libE77 dir unless it doesn't
exist, if it does just delete all objects in it.
Compile using $(GCC_FOR_TARGET), not $(CC).
(rebuilt): Remove this and all subordinate targets,
as parent Makefile now handles all that.
(*clean): Remove.
* configure.in (Pad_UDread, ALWAYS_FLUSH, WANT_LEAD_0):
Remove these and commentary to new f2c.h file.
AC_OUTPUT g2c.h instead of f2c.h. Remove old commentary
regarding concatenation.
* g2c.h.in: Rename from f2c.h.in, add appropriate
commentary.
* f2c.h: New file, a wrapper for g2c.h that does
libg2c-specific stuff.
* libF77/Makefile.in, libI77/Makefile.in, libU77/Makefile.in:
Change $(ALL_CFLAGS) to use F2C_H_DIR, G2C_H_DIR, and GCC_H_DIR
macros. Remove F2C_H macro, replace use with explicit
dependencies on f2c.h and g2c.h.
(*clean): Remove.
From-SVN: r20507
-rw-r--r-- | libf2c/ChangeLog | 53 | ||||
-rw-r--r-- | libf2c/Makefile.in | 127 | ||||
-rw-r--r-- | libf2c/README | 6 | ||||
-rwxr-xr-x | libf2c/configure | 211 | ||||
-rw-r--r-- | libf2c/configure.in | 66 | ||||
-rw-r--r-- | libf2c/f2c.h | 64 | ||||
-rw-r--r-- | libf2c/g2c.h.in (renamed from libf2c/f2c.h.in) | 11 | ||||
-rw-r--r-- | libf2c/libF77/Makefile.in | 43 | ||||
-rw-r--r-- | libf2c/libI77/Makefile.in | 42 | ||||
-rw-r--r-- | libf2c/libU77/Makefile.in | 91 |
10 files changed, 397 insertions, 317 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index ca82070..6940abb 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,56 @@ +Sat Jun 13 03:46:40 1998 Craig Burley <burley@gnu.org> + + * Makefile.in (install): Don't install if $(libsubdir) + is empty; issue a diagnostic saying top-level Makefile + must pass it in instead, and exit. + + * Makefile.in (g2c.h): Rename from f2c.h. + + * Makefile.in, libF77/Makefile.in, libI77/Makefile.in, + libU77/Makefile.in: Rewrite config and var assignment + sections to be even more minimal than before, and to + more clearly documented what macros are expected to be + set and to what sorts of values. Eliminate CROSS and + related stuff, since there's no such things as CROSS + in egcs. Rename GCC_FOR_TARGET to CC throughout. + * Makefile.in (stamp-libi77, stamp-libf77, stamp-libu77): + Eliminate CROSS. + * configure.in: Eliminate CROSS. + + Rename libf2c.a and f2c.h to libg2c.a and g2c.h, + normalize and simplify g77/libg2c build process: + * Makefile.in: Remove all stuff pertaining to + installation, cleaning, and so on. Parent Makefile + does all that now. Pass F2C_H_DIR, + G2C_H_DIR, and GCC_H_DIR, the pathnames for the + directories containing f2c.h, g2c.h, and other + #include files, to subdirectory Makefiles. + (stamp-libf77, stamp-libi77, stamp-libu77): + Don't specify `-f Makefile' anymore, it's not needed + now that subdirectory makefile's from netlib are + renamed to makefile.netlib in g77 source (and to + makefile.ori by configuration process, in case they're + still around somehow). + (stamp-libe77): Don't make libE77 dir unless it doesn't + exist, if it does just delete all objects in it. + Compile using $(GCC_FOR_TARGET), not $(CC). + (rebuilt): Remove this and all subordinate targets, + as parent Makefile now handles all that. + (*clean): Remove. + * configure.in (Pad_UDread, ALWAYS_FLUSH, WANT_LEAD_0): + Remove these and commentary to new f2c.h file. + AC_OUTPUT g2c.h instead of f2c.h. Remove old commentary + regarding concatenation. + * g2c.h.in: Rename from f2c.h.in, add appropriate + commentary. + * f2c.h: New file, a wrapper for g2c.h that does + libg2c-specific stuff. + * libF77/Makefile.in, libI77/Makefile.in, libU77/Makefile.in: + Change $(ALL_CFLAGS) to use F2C_H_DIR, G2C_H_DIR, and GCC_H_DIR + macros. Remove F2C_H macro, replace use with explicit + dependencies on f2c.h and g2c.h. + (*clean): Remove. + 1998-05-20 Dave Love <d.love@dl.ac.uk> * Makefile.in ($(lib)): Use shell loop instead of unportable diff --git a/libf2c/Makefile.in b/libf2c/Makefile.in index 21b136b..abce5ea 100644 --- a/libf2c/Makefile.in +++ b/libf2c/Makefile.in @@ -60,24 +60,16 @@ LIBCFLAGS = $(CFLAGS) # overrides thouh $(MAKE)) but may be needed by older versions.' FLAGS_TO_PASS= \ - "SHELL=$(SHELL)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "prefix=$(prefix)" \ - "exec_prefix=$(exec_prefix)" \ - "tooldir=$(tooldir)" \ - "AR=$(AR)" \ - "AR_FLAGS=$(AR_FLAGS)" \ "CC=$(CC)" \ "CFLAGS=$(CFLAGS)" \ - "RANLIB=$(RANLIB)" \ + "F2C_H_DIR=$(s)/libf2c" \ + "G2C_H_DIR=$(r)/libraries/libf2c" \ + "GCC_H_DIR=$(s)/include" \ "LIBCFLAGS=$(LIBCFLAGS)" \ "PICFLAG=$(PICFLAG)" \ "RUNTESTFLAGS=$(RUNTESTFLAGS)" - -lib = libf2c.a +LIBG2C = libg2c.a MISC = libF77/F77_aloc.o libF77/VersionF.o libF77/main.o libF77/s_rnge.o \ libF77/abort_.o libF77/getarg_.o libF77/iargc_.o libF77/getenv_.o \ @@ -151,90 +143,117 @@ F2CEXT = abort derf derfc ef1asc ef1cmc erf erfc exit getarg getenv iargc \ secnds second sleep srand stat symlnk sclock time ttynam umask unlink \ vxtidt vxttim alarm -all: f2c.h $(lib) +all: g2c.h $(LIBG2C) -$(lib): stamp-libf77 stamp-libi77 stamp-libu77 stamp-libe77 - rm -f $(lib) - $(AR) $(AR_FLAGS) $(lib) $(FOBJ) - $(AR) $(AR_FLAGS) $(lib) $(IOBJ) - $(AR) $(AR_FLAGS) $(lib) $(UOBJ) +$(LIBG2C): stamp-libf77 stamp-libi77 stamp-libu77 stamp-libe77 + rm -f $(LIBG2C) + $(AR) $(AR_FLAGS) $(LIBG2C) $(FOBJ) + $(AR) $(AR_FLAGS) $(LIBG2C) $(IOBJ) + $(AR) $(AR_FLAGS) $(LIBG2C) $(UOBJ) objs=""; for i in $(F2CEXT); do objs="$$objs libE77/L$$i.o"; done; \ - $(AR) $(AR_FLAGS) $(lib) $$objs - $(RANLIB) $(lib) + $(AR) $(AR_FLAGS) $(LIBG2C) $$objs + $(RANLIB) $(LIBG2C) stamp-libi77: libI77/Makefile rm -f stamp-libi77 - cd libI77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all + cd libI77; $(MAKE) $(FLAGS_TO_PASS) all touch stamp-libi77 stamp-libf77: libF77/Makefile rm -f stamp-libf77 - cd libF77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all + cd libF77; $(MAKE) $(FLAGS_TO_PASS) all touch stamp-libf77 stamp-libu77: libU77/Makefile rm -f stamp-libu77 - cd libU77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all + cd libU77; $(MAKE) $(FLAGS_TO_PASS) all touch stamp-libu77 stamp-libe77: $(srcdir)/f2cext.c - rm -fr libE77 - mkdir libE77 + rm -f stamp-libe77 + if [ -d libE77 ]; then rm -f libE77/*.o; else mkdir libE77; fi for name in $(F2CEXT); \ do \ echo $${name}; \ $(CC) -c -I. -I$(srcdir) -I../../include $(CPPFLAGS) $(CFLAGS) \ - $(CGFLAGS) -DL$${name} $(srcdir)/f2cext.c \ + -DL$${name} $(srcdir)/f2cext.c \ -o libE77/L$${name}.o; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ done touch stamp-libe77 ${srcdir}/configure: ${srcdir}/configure.in - rm -f config.cache && cd ${srcdir} && autoconf && rm -f config.cache + rm -f config.cache Makefile g2c.h \ + && cd $(srcdir) && autoconf && rm -f config.cache ${srcdir}/libU77/configure: ${srcdir}/libU77/configure.in - rm -f libU77/config.cache && cd ${srcdir}/libU77 && autoconf && rm -f config.cache -f2c.h Makefile: $(srcdir)/Makefile.in config.status + rm -f libU77/config.cache libU77/Makefile && \ + cd $(srcdir)/libU77 && autoconf && rm -f config.cache +g2c.h Makefile: $(srcdir)/g2c.h.in $(srcdir)/Makefile.in config.status $(SHELL) config.status config.status: $(srcdir)/configure $(SHELL) config.status --recheck -f2c.h: $(srcdir)/f2c.h.in - info install-info clean-info dvi: check: cd libU77; $(MAKE) G77DIR=../../../gcc/ check install: - $(INSTALL_DATA) $(lib) $(libdir)/$(lib).n - ( cd $(libdir) ; $(RANLIB) $(lib).n ) - mv -f $(libdir)/$(lib).n $(libdir)/$(lib) - $(INSTALL_DATA) f2c.h $(includedir)/f2c.h + @if [ x$(libsubdir) = x ]; then \ + echo ''; \ + echo 'libf2c error: libsubdir environment variable is not'; \ + echo ' exported by top-level Makefile. libg2c.a and g2c.h'; \ + echo ' are installed in the directory tree identified named'; \ + echo ' by that variable, the same tree in which the gcc-'; \ + echo ' specific executables, libraries, and so on are installed.'; \ + echo ' Rather than try to extract the name of this tree via'; \ + echo ' a kludge, libf2c/Makefile.in simply assumes it is passed'; \ + echo ' in as an environment variable. Someone needs to make'; \ + echo ' the appropriate changes to the top-level Makefile.in for'; \ + echo ' this to happen.'; \ + echo ''; \ + echo ' In the meantime, you can try setting libsubdir explicitly'; \ + echo ' in the make command line via libsubdir=/foo/lib/gcc-lib/...,'; \ + echo ' where foo and ... indicate wherever the cc1 and f771'; \ + echo ' executables were installed as part of this overall'; \ + echo ' installation process.'; \ + echo ''; \ + exit 1; \ + fi + $(INSTALL_DATA) $(LIBG2C) $(libsubdir)/$(LIBG2C).n + ( cd $(libsubdir) ; $(RANLIB) $(LIBG2C).n ) + mv -f $(libsubdir)/$(LIBG2C).n $(libsubdir)/$(LIBG2C) + $(INSTALL_DATA) g2c.h $(libsubdir)/include/g2c.h + @if [ -f f2c-install-ok -o -f $(srcdir)/f2c-install-ok ]; then \ + echo ''; \ + echo 'Warning: g77 no longer installs libf2c.a or f2c.h.'; \ + echo ' You must do so yourself. For more information,'; \ + echo ' read "Distributing Binaries" in the g77 docs.'; \ + echo ' (To turn off this warning, delete the file'; \ + echo ' f2c-install-ok in the source or build directory.)'; \ + echo ''; \ + fi mostlyclean: - -rm -f stamp-* - for i in libI77 libF77 libU77; do \ - if [ -f $$i/Makefile ]; then \ - cd $$i; $(MAKE) -f Makefile mostlyclean; cd ..; \ - fi; \ - done + rm -f stamp-* $(LIBG2C) + rm -f libF77/*.o + rm -f libI77/*.o + rm -f libU77/*.o rm -fr libE77 clean: - -rm -f config.log stamp-* - for i in libI77 libF77 libU77; do \ - if [ -f $$i/Makefile ]; then \ - cd $$i; $(MAKE) -f Makefile clean; cd ..; \ - fi; \ - done - rm -fr libE77 - -distclean: clean - -rm -f Makefile config.cache lib?77/Makefile config.status lib?77/config.status lib?77/config.cache lib?77/config.h f2c.h - -maintainer-clean: distclean - -rm -f $(srcdir)/configure $(srcdir)/libU77/configure + rm -f config.log + rm -f libF77/Makefile + rm -f libI77/Makefile + rm -f libU77/Makefile libU77/config.log libU77/a.out + +distclean: + rm -f Makefile config.cache config.status g2c.h + rm -f lib?77/Makefile lib?77/config.status + rm -f lib?77/config.cache lib?77/config.h + +maintainer-clean: + rm -f $(srcdir)/configure $(srcdir)/libU77/configure rebuilt: ${srcdir}/configure ${srcdir}/libU77/configure diff --git a/libf2c/README b/libf2c/README index 9419af7..3d0e29d 100644 --- a/libf2c/README +++ b/libf2c/README @@ -1,8 +1,10 @@ -970811 +1998-04-20 This directory contains the f2c library packaged for use with g77 to configure and build automatically (in principle!) as part of the top-level configure and make steps. This depends on the makefile and configure fragments in ../f. +g77 names this library `libg2c' to avoid conflict with existing copies +of `libf2c' on a system. Some small changes have been made to the f2c distributions of lib[FI]77 which come from <ftp:bell-labs.com/netlib/f2c/> and are maintained (excellently) by @@ -26,7 +28,7 @@ interesting, but should not be taken as guidelines for how to configure and build libf2c in g77's distribution. The packaging for auto-configuration was done by Dave Love <d.love@dl.ac.uk>. -Minor changes have been made by James Craig Burley <burley@gnu.ai.mit.edu>, +Minor changes have been made by James Craig Burley <burley@gnu.org>, who probably broke things Dave had working. :-) Among the user-visible changes (choices) g77 makes in its diff --git a/libf2c/configure b/libf2c/configure index 45788f6..a4f51cb 100755 --- a/libf2c/configure +++ b/libf2c/configure @@ -520,22 +520,14 @@ fi -# From configure.in 1.10 +# From configure.in 1.11 -if test "$CROSS";then - if test "$CC_FOR_TARGET"; then - CC="$CC_FOR_TARGET" - else - CC="../../xgcc -B../../xgcc/" - fi - ac_cv_c_cross=yes -else - # For g77 we'll set CC to point at the built gcc, but this will get it into - # the makefiles - # Extract the first word of "gcc", so it can be a program name with args. +# For g77 we'll set CC to point at the built gcc, but this will get it into +# the makefiles +# Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:539: checking for $ac_word" >&5 +echo "configure:531: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -564,7 +556,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:568: checking for $ac_word" >&5 +echo "configure:560: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -612,7 +604,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:616: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:608: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -622,11 +614,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 626 "configure" +#line 618 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -646,12 +638,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:655: checking whether we are using GNU C" >&5 +echo "configure:647: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -660,7 +652,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -675,7 +667,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:679: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:671: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -702,8 +694,6 @@ else test "${CFLAGS+set}" = set || CFLAGS="-g" fi - ac_cv_c_cross=no -fi test "$AR" || AR=ar @@ -717,7 +707,7 @@ else # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:721: checking for $ac_word" >&5 +echo "configure:711: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -750,7 +740,7 @@ fi # Sanity check for the cross-compilation case: echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:754: checking how to run the C preprocessor" >&5 +echo "configure:744: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -765,13 +755,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 769 "configure" +#line 759 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -782,13 +772,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 786 "configure" +#line 776 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -812,17 +802,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for stdio.h""... $ac_c" 1>&6 -echo "configure:816: checking for stdio.h" >&5 +echo "configure:806: checking for stdio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 821 "configure" +#line 811 "configure" #include "confdefs.h" #include <stdio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -850,12 +840,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:854: checking for ANSI C header files" >&5 +echo "configure:844: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 859 "configure" +#line 849 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -863,7 +853,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -880,7 +870,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 884 "configure" +#line 874 "configure" #include "confdefs.h" #include <string.h> EOF @@ -898,7 +888,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 902 "configure" +#line 892 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -919,7 +909,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 923 "configure" +#line 913 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -930,7 +920,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -956,12 +946,12 @@ fi echo $ac_n "checking for posix""... $ac_c" 1>&6 -echo "configure:960: checking for posix" >&5 +echo "configure:950: checking for posix" >&5 if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 965 "configure" +#line 955 "configure" #include "confdefs.h" #include <sys/types.h> #include <unistd.h> @@ -987,12 +977,12 @@ echo "$ac_t""$g77_cv_header_posix" 1>&6 # We can rely on the GNU library being posix-ish. I guess checking the # header isn't actually like checking the functions, though... echo $ac_n "checking for GNU library""... $ac_c" 1>&6 -echo "configure:991: checking for GNU library" >&5 +echo "configure:981: checking for GNU library" >&5 if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 996 "configure" +#line 986 "configure" #include "confdefs.h" #include <stdio.h> #ifdef __GNU_LIBRARY__ @@ -1016,12 +1006,12 @@ echo "$ac_t""$g77_cv_lib_gnu" 1>&6 # Apparently cygwin needs to be special-cased. echo $ac_n "checking for cyg\`win'32""... $ac_c" 1>&6 -echo "configure:1020: checking for cyg\`win'32" >&5 +echo "configure:1010: checking for cyg\`win'32" >&5 if eval "test \"`echo '$''{'g77_cv_sys_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1025 "configure" +#line 1015 "configure" #include "confdefs.h" #ifdef __CYGWIN32__ yes @@ -1044,12 +1034,12 @@ echo "$ac_t""$g77_cv_sys_cygwin32" 1>&6 # ditto for mingw32. echo $ac_n "checking for mingw32""... $ac_c" 1>&6 -echo "configure:1048: checking for mingw32" >&5 +echo "configure:1038: checking for mingw32" >&5 if eval "test \"`echo '$''{'g77_cv_sys_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1053 "configure" +#line 1043 "configure" #include "confdefs.h" #ifdef __MINGW32__ yes @@ -1073,17 +1063,17 @@ echo "$ac_t""$g77_cv_sys_mingw32" 1>&6 ac_safe=`echo "fcntl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for fcntl.h""... $ac_c" 1>&6 -echo "configure:1077: checking for fcntl.h" >&5 +echo "configure:1067: checking for fcntl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1082 "configure" +#line 1072 "configure" #include "confdefs.h" #include <fcntl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1116,12 +1106,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1120: checking for working const" >&5 +echo "configure:1110: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1125 "configure" +#line 1115 "configure" #include "confdefs.h" int main() { @@ -1170,7 +1160,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:1174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1191,12 +1181,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1195: checking for size_t" >&5 +echo "configure:1185: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1200 "configure" +#line 1190 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1225,12 +1215,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1229: checking return type of signal handlers" >&5 +echo "configure:1219: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1234 "configure" +#line 1224 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -1247,7 +1237,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1268,12 +1258,12 @@ EOF # we'll get atexit by default if test $ac_cv_header_stdc != yes; then echo $ac_n "checking for atexit""... $ac_c" 1>&6 -echo "configure:1272: checking for atexit" >&5 +echo "configure:1262: checking for atexit" >&5 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1277 "configure" +#line 1267 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char atexit(); below. */ @@ -1296,7 +1286,7 @@ atexit(); ; return 0; } EOF -if { (eval echo configure:1300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_atexit=yes" else @@ -1321,12 +1311,12 @@ else EOF echo $ac_n "checking for onexit""... $ac_c" 1>&6 -echo "configure:1325: checking for onexit" >&5 +echo "configure:1315: checking for onexit" >&5 if eval "test \"`echo '$''{'ac_cv_func_onexit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1330 "configure" +#line 1320 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char onexit(); below. */ @@ -1349,7 +1339,7 @@ onexit(); ; return 0; } EOF -if { (eval echo configure:1353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_onexit=yes" else @@ -1367,12 +1357,12 @@ if eval "test \"`echo '$ac_cv_func_'onexit`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for on_exit""... $ac_c" 1>&6 -echo "configure:1371: checking for on_exit" >&5 +echo "configure:1361: checking for on_exit" >&5 if eval "test \"`echo '$''{'ac_cv_func_on_exit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1376 "configure" +#line 1366 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char on_exit(); below. */ @@ -1395,7 +1385,7 @@ on_exit(); ; return 0; } EOF -if { (eval echo configure:1399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_on_exit=yes" else @@ -1428,12 +1418,12 @@ fi # Apparently positive result on cygwin loses re. NON_UNIX_STDIO # (as of cygwin b18). Likewise on mingw. echo $ac_n "checking for fstat""... $ac_c" 1>&6 -echo "configure:1432: checking for fstat" >&5 +echo "configure:1422: checking for fstat" >&5 if eval "test \"`echo '$''{'ac_cv_func_fstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1437 "configure" +#line 1427 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char fstat(); below. */ @@ -1456,7 +1446,7 @@ fstat(); ; return 0; } EOF -if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_fstat=yes" else @@ -1476,7 +1466,7 @@ else fi echo $ac_n "checking need for NON_UNIX_STDIO""... $ac_c" 1>&6 -echo "configure:1480: checking need for NON_UNIX_STDIO" >&5 +echo "configure:1470: checking need for NON_UNIX_STDIO" >&5 if test $g77_cv_sys_cygwin32 = yes \ || test $g77_cv_sys_mingw32 = yes \ || test $ac_cv_func_fstat = no; then @@ -1491,19 +1481,19 @@ fi # This is necessary for e.g. Linux: echo $ac_n "checking for necessary members of struct FILE""... $ac_c" 1>&6 -echo "configure:1495: checking for necessary members of struct FILE" >&5 +echo "configure:1485: checking for necessary members of struct FILE" >&5 if eval "test \"`echo '$''{'g77_cv_struct_FILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1500 "configure" +#line 1490 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE s; s._ptr; s._base; s._flag; ; return 0; } EOF -if { (eval echo configure:1507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* g77_cv_struct_FILE=yes else @@ -1523,7 +1513,7 @@ EOF fi echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6 -echo "configure:1527: checking for drem in -lm" >&5 +echo "configure:1517: checking for drem in -lm" >&5 ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1531,7 +1521,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 1535 "configure" +#line 1525 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1542,7 +1532,7 @@ int main() { drem() ; return 0; } EOF -if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1570,12 +1560,12 @@ fi for ac_func in tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1574: checking for $ac_func" >&5 +echo "configure:1564: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1579 "configure" +#line 1569 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1598,7 +1588,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1628,19 +1618,19 @@ done # However, on my sunos4/gcc setup unistd.h leads us wrongly to believe # we're posix-conformant, so always do the test. echo $ac_n "checking for ansi/posix sprintf result""... $ac_c" 1>&6 -echo "configure:1632: checking for ansi/posix sprintf result" >&5 +echo "configure:1622: checking for ansi/posix sprintf result" >&5 if test "$cross_compiling" = yes; then g77_cv_sys_sprintf_ansi=no else cat > conftest.$ac_ext <<EOF -#line 1637 "configure" +#line 1627 "configure" #include "confdefs.h" #include <stdio.h> /* does sprintf return the number of chars transferred? */ main () {char foo[2]; (sprintf(foo, "1") == 1) ? exit(0) : exit(1);} EOF -if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then g77_cv_sys_sprintf_ansi=yes else @@ -1658,11 +1648,8 @@ else g77_cv_sys_sprintf_ansi=$g77_cv_sys_sprintf_ansi fi -if test $ac_cv_c_cross = no; then - echo "$ac_t""$g77_cv_sys_sprintf_ansi" 1>&6 -else - echo "$ac_t""can't tell -- assuming no" 1>&6 -fi +echo "$ac_t""$g77_cv_sys_sprintf_ansi" 1>&6 + # The cygwin patch takes steps to avoid defining USE_STRLEN here -- I don't # understand why. if test $g77_cv_sys_sprintf_ansi != yes; then @@ -1674,9 +1661,9 @@ fi # define NON_ANSI_RW_MODES on unix (can't hurt) echo $ac_n "checking NON_ANSI_RW_MODES""... $ac_c" 1>&6 -echo "configure:1678: checking NON_ANSI_RW_MODES" >&5 +echo "configure:1665: checking NON_ANSI_RW_MODES" >&5 cat > conftest.$ac_ext <<EOF -#line 1680 "configure" +#line 1667 "configure" #include "confdefs.h" #ifdef unix yes @@ -1717,7 +1704,7 @@ fi # (via com.h). proj.h and com.h are in $srcdir/.., config.h which they need # is in ../.. and the config files are in $srcdir/../../config. echo $ac_n "checking f2c integer type""... $ac_c" 1>&6 -echo "configure:1721: checking f2c integer type" >&5 +echo "configure:1708: checking f2c integer type" >&5 late_ac_cpp=$ac_cpp ac_cpp="$late_ac_cpp -I../../gcc/f -I../../gcc -I../../gcc/config" if test "$subdir" != . ; then @@ -1726,9 +1713,9 @@ fi if eval "test \"`echo '$''{'g77_cv_sys_f2cinteger'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - echo "configure:1730: using $ac_cpp" >&5 + echo "configure:1717: using $ac_cpp" >&5 cat > conftest.$ac_ext <<EOF -#line 1732 "configure" +#line 1719 "configure" #include "confdefs.h" #include "proj.h" #define FFECOM_DETERMINE_TYPES 1 @@ -1750,9 +1737,9 @@ fi rm -f conftest* if test "$g77_cv_sys_f2cinteger" = ""; then -echo "configure:1754: using $ac_cpp" >&5 +echo "configure:1741: using $ac_cpp" >&5 cat > conftest.$ac_ext <<EOF -#line 1756 "configure" +#line 1743 "configure" #include "confdefs.h" #include "proj.h" #define FFECOM_DETERMINE_TYPES 1 @@ -1787,7 +1774,7 @@ ac_cpp=$late_ac_cpp echo $ac_n "checking f2c long int type""... $ac_c" 1>&6 -echo "configure:1791: checking f2c long int type" >&5 +echo "configure:1778: checking f2c long int type" >&5 late_ac_cpp=$ac_cpp ac_cpp="$late_ac_cpp -I../../gcc/f -I../../gcc -I../../gcc/config" if test "$subdir" != . ; then @@ -1796,9 +1783,9 @@ fi if eval "test \"`echo '$''{'g77_cv_sys_f2clongint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - echo "configure:1800: using $ac_cpp" >&5 + echo "configure:1787: using $ac_cpp" >&5 cat > conftest.$ac_ext <<EOF -#line 1802 "configure" +#line 1789 "configure" #include "confdefs.h" #include "proj.h" #define FFECOM_DETERMINE_TYPES 1 @@ -1820,9 +1807,9 @@ fi rm -f conftest* if test "$g77_cv_sys_f2clongint" = ""; then -echo "configure:1824: using $ac_cpp" >&5 +echo "configure:1811: using $ac_cpp" >&5 cat > conftest.$ac_ext <<EOF -#line 1826 "configure" +#line 1813 "configure" #include "confdefs.h" #include "proj.h" #define FFECOM_DETERMINE_TYPES 1 @@ -1857,9 +1844,6 @@ ac_cpp=$late_ac_cpp - - - # This EOF_CHAR is a misfeature on unix. cat >> confdefs.h <<\EOF #define NO_EOF_CHAR_CHECK 1 @@ -1871,22 +1855,6 @@ cat >> confdefs.h <<\EOF EOF - - - -cat >> confdefs.h <<\EOF -#define Pad_UDread 1 -EOF - - - - - -cat >> confdefs.h <<\EOF -#define WANT_LEAD_0 1 -EOF - - # avoid confusion in case the `makefile's from the f2c distribution have # got put here test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori @@ -2026,7 +1994,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "Makefile f2c.h libI77/Makefile libF77/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile g2c.h libI77/Makefile libF77/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -2064,7 +2032,6 @@ s%@RANLIB_TEST@%$RANLIB_TEST%g s%@CPP@%$CPP%g s%@F2C_INTEGER@%$F2C_INTEGER%g s%@F2C_LONGINT@%$F2C_LONGINT%g -s%@CROSS@%$CROSS%g s%@subdirs@%$subdirs%g CEOF @@ -2107,7 +2074,7 @@ EOF cat >> $CONFIG_STATUS <<EOF -CONFIG_FILES=\${CONFIG_FILES-"Makefile f2c.h libI77/Makefile libF77/Makefile"} +CONFIG_FILES=\${CONFIG_FILES-"Makefile g2c.h libI77/Makefile libF77/Makefile"} EOF cat >> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/libf2c/configure.in b/libf2c/configure.in index 69d05d7..a2d9fe9 100644 --- a/libf2c/configure.in +++ b/libf2c/configure.in @@ -21,24 +21,12 @@ AC_INIT(libF77/Version.c) -AC_REVISION(1.10) +AC_REVISION(1.11) -dnl AC_C_CROSS -dnl Gives misleading `(cached)' message from the check. -if test "$CROSS";then - if test "$CC_FOR_TARGET"; then - CC="$CC_FOR_TARGET" - else - CC="../../xgcc -B../../xgcc/" - fi - ac_cv_c_cross=yes -else - dnl Checks for programs. - # For g77 we'll set CC to point at the built gcc, but this will get it into - # the makefiles - AC_PROG_CC - ac_cv_c_cross=no -fi +dnl Checks for programs. +# For g77 we'll set CC to point at the built gcc, but this will get it into +# the makefiles +AC_PROG_CC dnl These should be inherited in the recursive make, but ensure they are dnl defined: @@ -213,11 +201,8 @@ AC_TRY_RUN(changequote(<<, >>)dnl AC_CACHE_VAL(g77_cv_sys_sprintf_ansi, g77_cv_sys_sprintf_ansi=$g77_cv_sys_sprintf_ansi) dnl We get a misleading `(cached)' message... -if test $ac_cv_c_cross = no; then - AC_MSG_RESULT($g77_cv_sys_sprintf_ansi) -else - AC_MSG_RESULT([can't tell -- assuming no]) -fi +AC_MSG_RESULT($g77_cv_sys_sprintf_ansi) + # The cygwin patch takes steps to avoid defining USE_STRLEN here -- I don't # understand why. if test $g77_cv_sys_sprintf_ansi != yes; then @@ -347,44 +332,11 @@ AC_SUBST(F2C_LONGINT) dnl maybe check for drem/remainder -AC_SUBST(CROSS) - - # This EOF_CHAR is a misfeature on unix. AC_DEFINE(NO_EOF_CHAR_CHECK) AC_DEFINE(Skip_f2c_Undefs) -dnl Craig had these in f2c.h, but they're only relevant for building libf2c -dnl anyway. - -dnl For GNU Fortran (g77), we always enable the following behaviors for -dnl libf2c, to make things easy on the programmer. The alternate -dnl behaviors have their uses, and g77 might provide them as compiler, -dnl rather than library, options, so only a single copy of a shared libf2c -dnl need be built for a system. - -dnl This makes unformatted I/O more consistent in relation to other -dnl systems. It is not required by the F77 standard. - -AC_DEFINE(Pad_UDread) - -dnl This makes ERR= and IOSTAT= returns work properly in disk-full -dnl situations, making things work more as expected. It slows things -dnl down, so g77 will probably someday choose the original implementation -dnl on a case-by-case basis when it can be shown to not be necessary -dnl (e.g. no ERR= or IOSTAT=) or when it is given the appropriate -dnl compile-time option or, perhaps, source-code directive. - -dnl AC_DEFINE(ALWAYS_FLUSH) - -dnl Most Fortran implementations do this, so to make it easier -dnl to compare the output of g77-compiled programs to those compiled -dnl by most other compilers, tell libf2c to put leading zeros in -dnl appropriate places on output - -AC_DEFINE(WANT_LEAD_0) - # avoid confusion in case the `makefile's from the f2c distribution have # got put here test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori @@ -392,11 +344,9 @@ test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori AC_CONFIG_SUBDIRS(libU77) -AC_OUTPUT(Makefile f2c.h libI77/Makefile libF77/Makefile) +AC_OUTPUT(Makefile g2c.h libI77/Makefile libF77/Makefile) dnl We might have configuration options to: -dnl * allow non-standard string concatenation (use libF77 s_catow.o, -dnl not s_cat.o) dnl * change unit preconnexion in libI77/err.c (f_init.c) dnl * -DALWAYS_FLUSH in libI77 dnl * -DOMIT_BLANK_CC in libI77 diff --git a/libf2c/f2c.h b/libf2c/f2c.h new file mode 100644 index 0000000..f27703f --- /dev/null +++ b/libf2c/f2c.h @@ -0,0 +1,64 @@ +/* f2c.h file for GNU Fortran run-time library + Copyright (C) 1998 Free Software Foundation, Inc. + Contributed by James Craig Burley (burley@gnu.org). + +This file is part of GNU Fortran. + +GNU Fortran is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Fortran is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Fortran; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* This file currently is just a stub through which g77's copy + of netlib's libf2c, which g77 builds and installs as libg2c.a + (to avoid conflict), #include's g77's version of f2c.h, named + g2c.h. That file is, in turn, produced via g77's library + configuration process from g2c.h.in. + + By going through this extra "hoop", it is easy to provide for + libg2c-specific configuration and typedefs that aren't appropriate + in g2c.h itself (since that is intended to be installed so it can + be shared with f2c users), without changing the libf2c (libg2c) + routines themselves. (They continue to #include "f2c.h", just + like they do in netlib's version.) */ + +#include "g2c.h" + +/* For GNU Fortran (g77), we always enable the following behaviors for + libf2c, to make things easy on the programmer. The alternate + behaviors have their uses, and g77 might provide them as compiler, + rather than library, options, so only a single copy of a shared libf2c + need be built for a system. */ + +/* This makes unformatted I/O more consistent in relation to other + systems. It is not required by the F77 standard. */ + +#define Pad_UDread + +/* This makes ERR= and IOSTAT= returns work properly in disk-full + situations, making things work more as expected. It slows things + down, so g77 will probably someday choose the original implementation + on a case-by-case basis when it can be shown to not be necessary + (e.g. no ERR= or IOSTAT=) or when it is given the appropriate + compile-time option or, perhaps, source-code directive. + + (No longer defined, since it really slows down NFS access too much.) */ + +/* #define ALWAYS_FLUSH */ + +/* Most Fortran implementations do this, so to make it easier + to compare the output of g77-compiled programs to those compiled + by most other compilers, tell libf2c to put leading zeros in + appropriate places on output. */ + +#define WANT_LEAD_0 diff --git a/libf2c/f2c.h.in b/libf2c/g2c.h.in index 9037467..5897525 100644 --- a/libf2c/f2c.h.in +++ b/libf2c/g2c.h.in @@ -1,4 +1,13 @@ -/* f2c.h -- Standard Fortran to C header file */ +/* g2c.h -- g77 version of f2c (Standard Fortran to C header file) */ + +/* This file is generated by the g77 libg2c configuration process from a + file named g2c.h.in. This process sets up the appropriate types, + defines the appropriate macros, and so on. The resulting g2c.h file + is used to build g77's copy of libf2c, named libg2c, and also can + be used when compiling C code produced by f2c to link the resulting + object file(s) with those produced by the same version of g77 that + produced this file, allowing inter-operability of f2c-compiled and + g77-compiled code. */ /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." diff --git a/libf2c/libF77/Makefile.in b/libf2c/libF77/Makefile.in index d8d97a8..b2ce4db 100644 --- a/libf2c/libF77/Makefile.in +++ b/libf2c/libF77/Makefile.in @@ -1,7 +1,7 @@ # Makefile for GNU F77 compiler runtime. # Copyright 1990 - 1994 by AT&T Bell Laboratories and Bellcore (see the # file `Notice'). -# Portions of this file Copyright (C) 1995, 1996 Free Software Foundation, Inc. +# Portions of this file Copyright (C) 1995-1998 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Fortran. @@ -21,16 +21,35 @@ #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #02111-1307, USA. -SHELL = /bin/sh +#### Start of system configuration section. #### + +# $(srcdir) must be set to the g77 runtime libF77 source directory +# (g77/f/runtime/libF77). srcdir = @srcdir@ VPATH = @srcdir@ -#### Start of system configuration section. #### +# gcc/f/runtime/configure sets this to all the -D options appropriate +# for the configuration. +DEFS = @DEFS@ + +#### End of system configuration section. #### + +# Must be passed in explicitly. Sample values are shown below. +#CC = /gcc-build-dir/xgcc -B/gcc-build-dir/ +#CFLAGS = -O -g +#CPPFLAGS = +#F2C_H_DIR = /gcc-source-dir/f/runtime +#G2C_H_DIR = /gcc-build-dir/f/runtime +#GCC_H_DIR = /gcc-build-dir/include +ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR) -I$(F2C_H_DIR) -I$(GCC_H_DIR) $(CPPFLAGS) $(DEFS) $(CFLAGS) + +.SUFFIXES: +.SUFFIXES: .c .o .c.o: - $(CC) -c -DSkip_f2c_Undefs -I../ $(CFLAGS) $< + $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $< MISC = F77_aloc.o VersionF.o main.o s_rnge.o abort_.o getarg_.o iargc_.o\ getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o\ @@ -55,22 +74,14 @@ EFL = ef1asc_.o ef1cmc_.o CHAR = s_cat.o s_cmp.o s_copy.o F90BIT = lbitbits.o lbitshft.o qbitbits.o qbitshft.o -F2C_H = ../f2c.h - all: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \ $(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT) VersionF.o: Version.c - $(CC) -c $(CFLAGS) -o $@ $(srcdir)/Version.c - -mostlyclean clean: - -rm -f *.o - -distclean maintainer-clean: clean - -rm -f stage? include Makefile + $(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c # Not quite all these actually do depend on f2c.h... -$(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \ - $(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT): $(F2C_H) +$(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) $(HALF) $(CMP) $(EFL) \ + $(CHAR) $(F90BIT): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h -.PHONY: mostlyclean clean distclean maintainer-clean all +.PHONY: all diff --git a/libf2c/libI77/Makefile.in b/libf2c/libI77/Makefile.in index ec6f697..569b0a2 100644 --- a/libf2c/libI77/Makefile.in +++ b/libf2c/libI77/Makefile.in @@ -1,7 +1,7 @@ # Makefile for GNU F77 compiler runtime. # Copyright 1990 - 1994 by AT&T Bell Laboratories and Bellcore (see the # file `Notice'). -# Portions of this file Copyright (C) 1995, 1996 Free Software Foundation, Inc. +# Portions of this file Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Fortran. @@ -21,19 +21,29 @@ #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #02111-1307, USA. -SHELL = /bin/sh +#### Start of system configuration section. #### + +# $(srcdir) must be set to the g77 runtime libF77 source directory +# (g77/f/runtime/libF77). srcdir = @srcdir@ VPATH = @srcdir@ -#### Start of system configuration section. #### - -CPPFLAGS = @CPPFLAGS@ +# gcc/f/runtime/configure sets this to all the -D options appropriate +# for the configuration. DEFS = @DEFS@ -# f2c.h should already be installed in xgcc's include directory but add that -# to -I anyhow in case not using xgcc. -ALL_CFLAGS = -I. -I$(srcdir) -I.. $(CPPFLAGS) $(DEFS) $(CFLAGS) -CROSS = @CROSS@ + +#### End of system configuration section. #### + +# Must be passed in explicitly. Sample values are shown below. +#CC = /gcc-build-dir/xgcc -B/gcc-build-dir/ +#CFLAGS = -O -g +#CPPFLAGS = +#F2C_H_DIR = /gcc-source-dir/f/runtime +#G2C_H_DIR = /gcc-build-dir/f/runtime +#GCC_H_DIR = /gcc-build-dir/include + +ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR) -I$(F2C_H_DIR) -I$(GCC_H_DIR) $(CPPFLAGS) $(DEFS) $(CFLAGS) .SUFFIXES: .SUFFIXES: .c .o @@ -47,18 +57,10 @@ OBJ = VersionI.o backspace.o close.o dfe.o dolio.o due.o endfile.o err.o \ util.o wref.o wrtfmt.o wsfe.o wsle.o wsne.o xwsne.o \ ftell_.o -F2C_H = ../f2c.h - all: $(OBJ) VersionI.o: Version.c - $(CC) -c $(CGFLAGS) -o $@ $(srcdir)/Version.c - -mostlyclean clean: - -rm -f $(OBJ) - -distclean maintainer-clean: mostlyclean - -rm -f stage? include Makefile + $(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c backspace.o: fio.h close.o: fio.h @@ -114,6 +116,6 @@ xwsne.o: lio.h xwsne.o: fmt.h # May be pessimistic: -$(OBJ): $(F2C_H) +$(OBJ): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h -.PHONY: mostlyclean clean distclean maintainer-clean all +.PHONY: all diff --git a/libf2c/libU77/Makefile.in b/libf2c/libU77/Makefile.in index 12d175a..c72f2f0a 100644 --- a/libf2c/libU77/Makefile.in +++ b/libf2c/libU77/Makefile.in @@ -1,37 +1,52 @@ # Makefile for GNU F77 compiler runtime, libc interface. -# Copyright (C) 1995-1997 Free Software Foundation, Inc. +# Copyright (C) 1995-1998 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # -#This file is part of GNU Fortran libU77 library. +#This file is part of the GNU Fortran libU77 library. # -#This library is free software; you can redistribute it and/or modify -#it under the terms of the GNU Library General Public License as -#published by the Free Software Foundation; either version 2, or (at -#your option) any later version. +#The GNU Fortran libU77 library is free software; you can redistribute +#it and/or modify it under the terms of the GNU Library General Public +#License as published by the Free Software Foundation; either version 2, +#or (at your option) any later version. # -#GNU Fortran is distributed in the hope that it will be useful, but -#WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -#Library General Public License for more details. +#GNU Fortran is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU Library General Public License for more details. # #You should have received a copy of the GNU General Public License #along with GNU Fortran; see the file COPYING. If not, write to -#Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +#02111-1307, USA. -SHELL = /bin/sh +#### Start of system configuration section. #### + +# $(srcdir) must be set to the g77 runtime libF77 source directory +# (g77/f/runtime/libF77). srcdir = @srcdir@ VPATH = @srcdir@ -#### Start of system configuration section. #### - -CPPFLAGS = @CPPFLAGS@ +# gcc/f/runtime/configure sets this to all the -D options appropriate +# for the configuration. DEFS = @DEFS@ -# f2c.h should already be installed in xgcc's include directory but add that -# to -I anyhow in case not using xgcc. fio.h is in libI77. We need config.h -# from `.'. -ALL_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/../libI77 -I.. $(CPPFLAGS) $(DEFS) $(CFLAGS) -CROSS = @CROSS@ + +#### End of system configuration section. #### + +# Must be passed in explicitly. Sample values are shown below. +#CC = /gcc-build-dir/xgcc -B/gcc-build-dir/ +#CFLAGS = -O -g +#CPPFLAGS = +#F2C_H_DIR = /gcc-source-dir/f/runtime +#G2C_H_DIR = /gcc-build-dir/f/runtime +#GCC_H_DIR = /gcc-build-dir/include + +# fio.h is in libI77. config.h is in `.'. +ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR)/libI77 -I$(F2C_H_DIR)/libI77 -I$(G2C_H_DIR) -I$(F2C_H_DIR) -I$(GCC_H_DIR) $(CPPFLAGS) $(DEFS) $(CFLAGS) + +# This could probably be done more elegantly, but it's currently +# just for running the u77-test test. +G77DIR = ../../../ .SUFFIXES: .SUFFIXES: .c .o @@ -60,36 +75,17 @@ SRCS = Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \ umask_.c sys_clock_.c date_.c second_.c flush1_.c mclock_.c \ alarm_.c -F2C_H = ../f2c.h - all: $(OBJS) VersionU.o: Version.c - $(CC) -c $(CGFLAGS) -o $@ $(srcdir)/Version.c - -lint: - lint $(CFLAGS) $(SRCS) - -mostlyclean: - -rm -f $(OBJS) - -clean: mostlyclean - -rm -f config.log a.out - -distclean realclean maintainer-clean: clean - -rm -f config.h Makefile config.status config.cache stage? include - -$(OBJS): $(F2C_H) config.h - -check: - -$(G77DIR)g77 -B$(G77DIR) -L.. -g $(srcdir)/u77-test.f $(lib) && ./a.out - rm -f a.out + $(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c +$(OBJS): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h config.h access_.o: access_.c ctime_.o: ctime_.c dtime_.o: dtime_.c etime_.o: etime_.c -fnum_.o: fnum_.c $(srcdir)/../libI77/fio.h +fnum_.o: fnum_.c $(F2C_H_DIR)/libI77/fio.h fstat_.o: fstat_.c gerror_.o: gerror_.c getcwd_.o: getcwd_.c @@ -100,7 +96,7 @@ getuid_.o: getuid_.c idate_.o: idate_.c ierrno_.o: ierrno_.c irand_.o: irand_.c -isatty_.o: isatty_.c $(srcdir)/../libI77/fio.h +isatty_.o: isatty_.c $(F2C_H_DIR)/libI77/fio.h itime_.o: itime_.c kill_.o: kill_.c link_.o: link_.c @@ -141,4 +137,11 @@ flush1_.o: flush1_.c mclock_.o: mclock_.c alarm_.o: alarm_.c -.PHONY: mostlyclean clean distclean maintainer-clean lint check all +lint: + lint $(ALL_CFLAGS) $(SRCS) + +check: + -$(G77DIR)g77 -B$(G77DIR) -L.. -g $(srcdir)/u77-test.f $(lib) && ./a.out + rm -f a.out + +.PHONY: lint check all |