This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Fortran - trunk, committed] Make libf2c a shared library.


L.S.,

I just committed the appended patch (largely the work of Juergen
Pfeifer) to make libf2c a shared library.

Unfortunately, although the attached patch works (in the sense that it
passed make bootstrap, make install and make check - for Fortran, on
i686-pc-linux-gnu and alphaev6-unknown-linux-gnu), there are still a
couple of hickups:

1. The shared library is constructed and installed OK, as far as I
   can see.  However, the generated g77 doesn't seem to use the shared
   library (but the ordinary .a file).

2. I still do not understand all the ins and outs of libtool.  I'd
   appreciate it if some who are more able look into my Makefile.in /
   configure.in stuff.

3. As an example, I clearly do not understand why libtool rejects
   0.5.27 as the version number:

libtool: link: AGE `27' is greater than the current interface number `0'
libtool: link: `0:5:27' is not valid version information


4. There are still some (apparently harmless) error messages:

../../../../gcc/libf2c/libU77/configure: LIBU77_GETTIMEOFDAY: command
not found

Any help is greatly appreciated.

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
2001-09-29  Juergen Pfeifer  <juergen.pfeifer@gmx.net>

	Make libf2c a shared library - f directory.

	* Make-lang.in: Pass define of frtbegin.o to compilation of g77spec.c.
	* g77spec.c (lang_specific_driver): Treat linking in of frtbegin.o.

2001-09-29  Juergen Pfeifer  <juergen.pfeifer@gmx.net>
            Toon Moene  <toon@moene.indiv.nluug.nl>

	Make libf2c a shared library - libf2c directory.

	* aclocal.m4: Get definition of libtool.
	* Makefile.in: Use libtool.
	* configure.in: Use libtool.
	* configure: Regenerated.
	* libF77/Makefile.in: Use libtool; treat main program contained in
	libF77/main.c specially.
	* libF77/configure.in: Use libtool.
	* libF77/configure: Regenerated.
	* libI77/Makefile.in: Use libtool.
	* libI77/configure.in: Use libtool.
	* libI77/configure: Regenerated.
	* libU77/Makefile.in: Use libtool.
	* libU77/configure.in: Use libtool.
	* libU77/configure: Regenerated.
	* libU77/date_.c: Adapt for -fPIC compiling.
	* libU77/vxtidate_.c: Ditto.

*** ./gcc/f/Make-lang.in.orig	Thu Jul 12 09:41:13 2001
--- ./gcc/f/Make-lang.in	Sat Sep 29 12:41:48 2001
*************** g77spec.o: $(srcdir)/f/g77spec.c $(srcdi
*** 74,77 ****
--- 74,78 ----
  	if [ -f lang-f77 ]; then \
  	  $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ 		-DFORTRAN_INIT=\"$(libsubdir)/frtbegin.o\" \
  		$(srcdir)/f/g77spec.c $(OUTPUT_OPTION); \
  	else true; fi
*** ./gcc/f/g77spec.c.orig	Fri Jan 12 18:28:23 2001
--- ./gcc/f/g77spec.c	Sat Sep 29 12:41:48 2001
*************** lang_specific_driver (in_argc, in_argv, 
*** 287,290 ****
--- 287,293 ----
    int saw_library = 0;
  
+   /* 0 => initial/reset state
+      1 => FORTRAN_INIT linked in */
+   int use_init = 0;
    /* By default, we throw on the math library if we have one.  */
    int need_math = (MATH_LIBRARY[0] != '\0');
*************** For bug reporting instructions, please s
*** 519,523 ****
  		saw_library = 2;	/* -l<library> -lm. */
  	      else
! 		append_arg (FORTRAN_LIBRARY);
  	    }
  	  else if (strcmp (argv[i], FORTRAN_LIBRARY) == 0)
--- 522,533 ----
  		saw_library = 2;	/* -l<library> -lm. */
  	      else
! 		{
! 		  if (0 == use_init)
! 		    {
! 		      append_arg (FORTRAN_INIT);
! 		      use_init = 1;
! 		    }
! 		  append_arg (FORTRAN_LIBRARY);
! 		}
  	    }
  	  else if (strcmp (argv[i], FORTRAN_LIBRARY) == 0)
*************** For bug reporting instructions, please s
*** 543,546 ****
--- 553,561 ----
  	{
  	case 0:
+ 	  if (0 == use_init)
+ 	    {
+ 	      append_arg (FORTRAN_INIT);
+ 	      use_init = 1;
+ 	    }
  	  append_arg (library);
  	case 1:
*** ./libf2c/libF77/Makefile.in.orig	Sat Mar  6 01:02:52 1999
--- ./libf2c/libF77/Makefile.in	Sun Sep 30 22:22:07 2001
*************** VPATH = @srcdir@
*** 32,37 ****
  DEFS = @DEFS@
  
- LIBG2C = ../libg2c.a
- 
  F2C_H_DIR = @srcdir@/..
  G2C_H_DIR = ..
--- 32,35 ----
*************** CC = @CC@
*** 39,44 ****
  CFLAGS = @CFLAGS@
  CPPFLAGS = @CPPFLAGS@
- AR = @AR@
- ARFLAGS = rc
  @SET_MAKE@
  
--- 37,40 ----
*************** ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_D
*** 53,59 ****
  
  .c.o:
! 	$(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\
  	derf_.o derfc_.o erf_.o erfc_.o sig_die.o exit_.o setarg.o setsig.o
--- 49,55 ----
  
  .c.o:
! 	@LIBTOOL@ --mode=compile $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $<
  
! MISC =	F77_aloc.o VersionF.o s_rnge.o abort_.o getarg_.o iargc_.o\
  	getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o\
  	derf_.o derfc_.o erf_.o erfc_.o sig_die.o exit_.o setarg.o setsig.o
*************** OBJS = $(MISC) $(POW) $(CX) $(DCX) $(REA
*** 81,91 ****
  	 $(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT)
  
! all: ../s-libf77
  
  ../s-libf77: $(OBJS)
  	echo timestamp > ../s-libf77
  
! archive:
! 	$(AR) $(ARFLAGS) $(LIBG2C) $(OBJS)
  
  Makefile: Makefile.in config.status
--- 77,91 ----
  	 $(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT)
  
! all: ../s-libf77 ../frtbegin.o
  
  ../s-libf77: $(OBJS)
  	echo timestamp > ../s-libf77
  
! objlist:
! 	objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! 	   x=`echo $$i | sed -e "s/\.o$$/.lo/g"` ;\
! 	   objs="$$objs libF77/$$x" ;\
! 	done ; \
! 	echo -n $$objs > ../objlist
  
  Makefile: Makefile.in config.status
*************** Makefile: Makefile.in config.status
*** 94,98 ****
  config.status: configure
  	rm -f config.cache
! 	CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
  	  CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
  
--- 94,98 ----
  config.status: configure
  	rm -f config.cache
! 	CONFIG_SITE=no-such-file CC='$(CC)' CFLAGS='$(CFLAGS)' \
  	  CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
  
*************** ${srcdir}/configure: configure.in
*** 102,109 ****
  
  VersionF.o: Version.c
! 	$(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c
  
  F77_aloc.o: F77_aloc.c
- main.o: main.c
  s_rnge.o: s_rnge.c
  abort_.o: abort_.c
--- 102,111 ----
  
  VersionF.o: Version.c
! 	@LIBTOOL@ --mode=compile $(CC) -c $(ALL_CFLAGS) $(srcdir)/Version.c -o $@
! 
! ../frtbegin.o : main.c
! 	$(CC) -c $(ALL_CFLAGS) $(srcdir)/main.c -o $@
  
  F77_aloc.o: F77_aloc.c
  s_rnge.o: s_rnge.c
  abort_.o: abort_.c
*************** check install uninstall install-strip di
*** 233,237 ****
  
  mostlyclean:
! 	rm -f *.o
  
  clean: mostlyclean
--- 235,240 ----
  
  mostlyclean:
! 	rm -f *.o *.lo ../frtbegin.o
! 	rm -rf .libs
  
  clean: mostlyclean
*** ./libf2c/libF77/configure.in.orig	Sun Sep 30 20:47:51 2001
--- ./libf2c/libF77/configure.in	Sun Sep 30 21:44:34 2001
*************** define([AC_PROG_CC_WORKS],[])
*** 33,36 ****
--- 33,39 ----
  AC_PROG_CC
  
+ LIBTOOL='$(SHELL) ../libtool'
+ AC_SUBST(LIBTOOL)
+ 
  test "$AR" || AR=ar
  AC_SUBST(AR)
*** ./libf2c/libI77/Makefile.in.orig	Sat Jul  7 20:33:34 2001
--- ./libf2c/libI77/Makefile.in	Sun Sep 30 22:22:28 2001
*************** VPATH = @srcdir@
*** 32,37 ****
  DEFS = @DEFS@
  
- LIBG2C = ../libg2c.a
- 
  F2C_H_DIR = @srcdir@/..
  G2C_H_DIR = ..
--- 32,35 ----
*************** CC = @CC@
*** 39,44 ****
  CFLAGS = @CFLAGS@
  CPPFLAGS = @CPPFLAGS@
- AR = @AR@
- ARFLAGS = rc
  @SET_MAKE@
  
--- 37,40 ----
*************** ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_D
*** 54,60 ****
  
  .c.o:
! 	$(CC) -c -DSkip_f2c_Undefs -DAllow_TYQUAD $(ALL_CFLAGS) $<
  
! OBJ =	VersionI.o backspace.o close.o dfe.o dolio.o due.o endfile.o err.o \
  	fmt.o fmtlib.o iio.o ilnw.o inquire.o lread.o lwrite.o open.o \
  	rdfmt.o rewind.o rsfe.o rsli.o rsne.o sfe.o sue.o typesize.o uio.o \
--- 50,56 ----
  
  .c.o:
! 	@LIBTOOL@ --mode=compile $(CC) -c -DSkip_f2c_Undefs -DAllow_TYQUAD $(ALL_CFLAGS) $<
  
! OBJS =	VersionI.o backspace.o close.o dfe.o dolio.o due.o endfile.o err.o \
  	fmt.o fmtlib.o iio.o ilnw.o inquire.o lread.o lwrite.o open.o \
  	rdfmt.o rewind.o rsfe.o rsli.o rsne.o sfe.o sue.o typesize.o uio.o \
*************** OBJ =	VersionI.o backspace.o close.o dfe
*** 64,72 ****
  all: ../s-libi77
  
! ../s-libi77: $(OBJ)
  	echo timestamp > ../s-libi77
  
! archive:
! 	$(AR) $(ARFLAGS) $(LIBG2C) $(OBJ)
  
  Makefile: Makefile.in config.status
--- 60,72 ----
  all: ../s-libi77
  
! ../s-libi77: $(OBJS)
  	echo timestamp > ../s-libi77
  
! objlist:
! 	objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! 	   x=`echo $$i | sed -e "s/\.o$$/.lo/g"` ;\
! 	   objs="$$objs libI77/$$x" ;\
! 	done ; \
! 	echo -n $$objs > ../objlist
  
  Makefile: Makefile.in config.status
*************** Makefile: Makefile.in config.status
*** 75,79 ****
  config.status: configure
  	rm -f config.cache
! 	CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
  	  CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
  
--- 75,79 ----
  config.status: configure
  	rm -f config.cache
! 	CONFIG_SITE=no-such-file CC='$(CC)' CFLAGS='$(CFLAGS)' \
  	  CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
  
*************** stamp-h: config.h.in config.status
*** 95,99 ****
  
  VersionI.o: Version.c
! 	$(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c
  
  backspace.o:	backspace.c fio.h config.h
--- 95,99 ----
  
  VersionI.o: Version.c
! 	@LIBTOOL@ --mode=compile $(CC) -c $(ALL_CFLAGS) $(srcdir)/Version.c -o $@
  
  backspace.o:	backspace.c fio.h config.h
*************** xwsne.o:	xwsne.c fmt.h
*** 154,163 ****
  
  # May be pessimistic:
! $(OBJ): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h
  
  check install uninstall install-strip dist installcheck installdirs:
  
  mostlyclean:
! 	rm -f *.o
  
  clean: mostlyclean
--- 154,164 ----
  
  # May be pessimistic:
! $(OBJS): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h
  
  check install uninstall install-strip dist installcheck installdirs:
  
  mostlyclean:
! 	rm -f *.o *.lo
! 	rm -rf .libs
  
  clean: mostlyclean
*** ./libf2c/libI77/configure.in.orig	Sun Sep 30 20:48:08 2001
--- ./libf2c/libI77/configure.in	Sun Sep 30 21:44:57 2001
*************** define([AC_PROG_CC_WORKS],[])
*** 43,46 ****
--- 43,49 ----
  AC_PROG_CC
  
+ LIBTOOL='$(SHELL) ../libtool'
+ AC_SUBST(LIBTOOL)
+ 
  test "$AR" || AR=ar
  AC_SUBST(AR)
*** ./libf2c/libU77/Makefile.in.orig	Wed Jan 24 23:24:48 2001
--- ./libf2c/libU77/Makefile.in	Sun Sep 30 22:22:51 2001
*************** DEFS = @DEFS@
*** 31,36 ****
  LIBS = @LIBS@
  
- LIBG2C = ../libg2c.a
- 
  F2C_H_DIR = @srcdir@/..
  G2C_H_DIR = ..
--- 31,34 ----
*************** CC = @CC@
*** 38,43 ****
  CFLAGS = @CFLAGS@
  CPPFLAGS = @CPPFLAGS@
- AR = @AR@
- ARFLAGS = rc
  @SET_MAKE@
  
--- 36,39 ----
*************** G77DIR = ../../../gcc/
*** 58,62 ****
  
  .c.o:
! 	$(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $<
  
  OBJS =  VersionU.o gerror_.o perror_.o ierrno_.o itime_.o time_.o \
--- 54,58 ----
  
  .c.o:
! 	@LIBTOOL@ --mode=compile $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $<
  
  OBJS =  VersionU.o gerror_.o perror_.o ierrno_.o itime_.o time_.o \
*************** all: ../s-libu77
*** 86,91 ****
  	echo timestamp > ../s-libu77
  
! archive:
! 	$(AR) $(ARFLAGS) $(LIBG2C) $(OBJS)
  
  Makefile: Makefile.in config.status
--- 82,91 ----
  	echo timestamp > ../s-libu77
  
! objlist:
! 	objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! 	   x=`echo $$i | sed -e "s/\.o$$/.lo/g"` ;\
! 	   objs="$$objs libU77/$$x" ;\
! 	done ; \
! 	echo -n $$objs > ../objlist
  
  Makefile: Makefile.in config.status
*************** Makefile: Makefile.in config.status
*** 94,98 ****
  config.status: configure
  	rm -f config.cache
! 	CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
  	  CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
  
--- 94,98 ----
  config.status: configure
  	rm -f config.cache
! 	CONFIG_SITE=no-such-file CC='$(CC)' CFLAGS='$(CFLAGS)' \
  	  CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
  
*************** stamp-h: config.hin config.status
*** 111,115 ****
  
  VersionU.o: Version.c
! 	$(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c
  
  $(OBJS): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h config.h
--- 111,115 ----
  
  VersionU.o: Version.c
! 	@LIBTOOL@ --mode=compile $(CC) -c $(ALL_CFLAGS) $(srcdir)/Version.c -o $@
  
  $(OBJS): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h config.h
*************** install uninstall install-strip dist ins
*** 180,184 ****
  
  mostlyclean:
! 	rm -f *.o a.out
  
  clean: mostlyclean
--- 180,185 ----
  
  mostlyclean:
! 	rm -f *.o *.lo a.out
! 	rm -rf .libs
  
  clean: mostlyclean
*** ./libf2c/libU77/configure.in.orig	Sun Sep 30 20:48:25 2001
--- ./libf2c/libU77/configure.in	Sun Sep 30 21:45:13 2001
*************** define([AC_PROG_CC_WORKS],[])
*** 43,46 ****
--- 43,49 ----
  AC_PROG_CC
  
+ LIBTOOL='$(SHELL) ../libtool'
+ AC_SUBST(LIBTOOL)
+ 
  dnl AC_C_CROSS
  dnl Gives misleading `(cached)' message from the check.
*** ./libf2c/libU77/date_.c.orig	Thu Jul  8 14:33:14 1999
--- ./libf2c/libU77/date_.c	Sat Sep 29 12:41:48 2001
*************** static integer c__5 = 5;
*** 39,40 ****
--- 39,55 ----
  } /* date_ */
  
+ #ifdef PIC
+ #  include <stdio.h>
+ 
+ const char *G77_Non_Y2K_Compliance_Message =
+    "Call to non Y2K compliant subroutine detected.";
+ 
+ int G77_date_y2kbuggy_0 (char *buf, ftnlen buf_len)
+ {
+   extern int G77_abort_0();
+   fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message);
+   G77_abort_0();
+ }
+ #endif
+ 
+ 
*** ./libf2c/libU77/vxtidate_.c.orig	Wed Jan 24 00:20:30 2001
--- ./libf2c/libU77/vxtidate_.c	Sat Sep 29 12:41:48 2001
*************** int G77_vxtidate_y2kbug_0 (integer *m, i
*** 55,56 ****
--- 55,71 ----
    return 0;
  }
+ 
+ #ifdef PIC
+ extern const char *G77_Non_Y2K_Compliance_Message;
+ #  ifdef KR_headers
+ int G77_vxtidate_y2kbuggy_0 (m, d, y)
+      integer *y, *m, *d;
+ #  else
+ int G77_vxtidate_y2kbuggy_0 (integer *m, integer *d, integer *y)
+ #  endif
+ {
+   extern int G77_abort_0();
+   fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message);
+   G77_abort_0();
+ }
+ #endif
*** ./libf2c/Makefile.in.orig	Wed Jul  4 21:09:40 2001
--- ./libf2c/Makefile.in	Sun Sep 30 22:43:04 2001
*************** gcc_version = @gcc_version@
*** 32,37 ****
--- 32,45 ----
  gcc_version_trigger = @gcc_version_trigger@
  
+ top_builddir = .
+ 
  libdir = $(exec_prefix)/lib
  libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
+ #
+ VERSION_MAJOR=0
+ VERSION_MINOR=5
+ # We'd rather had 27 here - to indicate the version at which
+ # a shared libf2c was created; however, libtool doesn't accept this.
+ VERSION_SUB=0
  
  # Multilib support variables.
*************** INSTALL_PROGRAM = @INSTALL_PROGRAM@
*** 50,58 ****
  INSTALL_DATA = @INSTALL_DATA@
  
! AR = @AR@
! AR_FLAGS = rc
! 
! RANLIB = @RANLIB@
! 
  CC = @CC@
  CFLAGS = @CFLAGS@
--- 58,62 ----
  INSTALL_DATA = @INSTALL_DATA@
  
! LIBTOOL = @LIBTOOL@
  CC = @CC@
  CFLAGS = @CFLAGS@
*************** CFLAGS = @CFLAGS@
*** 62,68 ****
  FLAGS_TO_PASS= \
  	CC='$(CC)' \
  	CFLAGS='$(CFLAGS)' \
  	CPPFLAGS='$(CPPFLAGS)' \
- 	AR='$(AR)' \
  	RANLIB='$(RANLIB)' \
  	prefix='$(prefix)' \
--- 66,72 ----
  FLAGS_TO_PASS= \
  	CC='$(CC)' \
+ 	LIBTOOL='$(LIBTOOL)' \
  	CFLAGS='$(CFLAGS)' \
  	CPPFLAGS='$(CPPFLAGS)' \
  	RANLIB='$(RANLIB)' \
  	prefix='$(prefix)' \
*************** FLAGS_TO_PASS= \
*** 72,76 ****
  	tooldir='$(tooldir)'
  
! LIBG2C = libg2c.a
  
  SUBDIRS = libI77 libF77 libU77
--- 76,81 ----
  	tooldir='$(tooldir)'
  
! LIBG2C_BASE = libg2c
! LIBG2C = $(LIBG2C_BASE).la
  
  SUBDIRS = libI77 libF77 libU77
*************** i77 f77 u77: g2c.h
*** 133,144 ****
  
  $(LIBG2C): s-libi77 s-libf77 s-libu77 s-libe77
! 	rm -f $(LIBG2C)
  	set -e; \
! 	for i in $(SUBDIRS); \
! 	  do (cd $$i && $(MAKE) $(FLAGS_TO_PASS) LIBG2C=../$(LIBG2C) archive); \
! 	done
! 	objs=""; for i in $(F2CEXT); do objs="$$objs libE77/L$$i.o"; done; \
! 	  $(AR) $(AR_FLAGS) $(LIBG2C) $$objs
! 	$(RANLIB) $(LIBG2C)
  
  i77:
--- 138,155 ----
  
  $(LIBG2C): s-libi77 s-libf77 s-libu77 s-libe77
! 	rm -f $@ ;\
  	set -e; \
! 	rm -f objlist ;\
! 	touch objlist ;\
! 	for i in $(SUBDIRS) ;\
! 	do \
! 	  (cd $$i && $(MAKE) $(FLAGS_TO_PASS) objlist) ;\
! 	done ;\
! 	objs="`cat objlist`" ;\
! 	for i in $(F2CEXT); do objs="$$objs libE77/L$$i.lo"; done ;\
! 	echo -n $$objs > objlist 
! 	$(LIBTOOL) --mode=link $(CC) -o $@ \
! 	  -version-info $(VERSION_MAJOR):$(VERSION_MINOR):$(VERSION_SUB) \
! 	  -rpath $(prefix)/lib `cat objlist` -lc -lm
  
  i77:
*************** u77:
*** 152,162 ****
  
  s-libe77: f2cext.c
! 	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) \
! 	    -DL$${name} $(srcdir)/f2cext.c \
! 	    -o libE77/L$${name}.o; \
  	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  	done
--- 163,173 ----
  
  s-libe77: f2cext.c
! 	if [ -d libE77 ]; then rm -f libE77/*.o libE77/*.lo; else mkdir libE77; fi
  	for name in $(F2CEXT); \
  	do \
  	  echo $${name}; \
! 	  $(LIBTOOL) --mode=compile $(CC) -c -I. -I$(srcdir) -I../../include \
! 	    $(CPPFLAGS) $(CFLAGS) -DL$${name} $(srcdir)/f2cext.c \
! 	    -o libE77/L$${name}.o ; \
  	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  	done
*************** check:
*** 195,201 ****
  
  install: all
! 	$(INSTALL_DATA) $(LIBG2C) $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n
! 	( cd $(libsubdir)/$(MULTISUBDIR) ; $(RANLIB) $(LIBG2C).n )
! 	mv -f $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C)
  	$(INSTALL_DATA) g2c.h $(libsubdir)/include/g2c.h
  	@if [ -f f2c-install-ok -o -f $(srcdir)/f2c-install-ok ]; then \
--- 206,215 ----
  
  install: all
! 	$(LIBTOOL) --mode=install $(INSTALL_DATA) $(LIBG2C) $(libsubdir)/$(MULTISUBDIR)
! 	(cd $(libsubdir)/$(MULTISUBDIR) ; \
! 	   if [ -f $(LIBG2C_BASE).so ]; then \
! 	     mv $(LIBG2C_BASE).so* $(prefix)/lib ;\
! 	   fi)
! 	$(INSTALL_DATA) frtbegin.o $(libsubdir)
  	$(INSTALL_DATA) g2c.h $(libsubdir)/include/g2c.h
  	@if [ -f f2c-install-ok -o -f $(srcdir)/f2c-install-ok ]; then \
*************** install: all
*** 209,212 ****
--- 223,227 ----
  	else true; fi
  	$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
+ 	@-$(LIBTOOL) --mode=finish $(prefix)/lib
  
  install-strip:
*************** install-strip:
*** 214,222 ****
  
  uninstall:
! 	rm -f $(libsubdir)/$(MULTISUBDIR)/include/g2c.h $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C)
  	$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
  
  mostlyclean:
! 	rm -f $(LIBG2C)
  	$(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
  	$(MULTICLEAN) multi-clean DO=$@
--- 229,238 ----
  
  uninstall:
! 	rm -f $(libsubdir)/$(MULTISUBDIR)/include/g2c.h $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C_BASE).*
! 	rm -f $(prefix)/lib/$(LIBG2C_BASE).so*
  	$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
  
  mostlyclean:
! 	rm -f $(LIBG2C) objlist
  	$(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
  	$(MULTICLEAN) multi-clean DO=$@
*************** clean: mostlyclean
*** 227,230 ****
--- 243,247 ----
  	$(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
  	$(MULTICLEAN) multi-clean DO=$@
+ 	rm -rf .libs
  
  distclean: clean
*** ./libf2c/configure.in.orig	Sun Sep 30 20:43:08 2001
--- ./libf2c/configure.in	Sun Sep 30 18:50:13 2001
*************** define([AC_PROG_CC_WORKS],[])
*** 74,77 ****
--- 74,78 ----
  
  AC_PROG_CC
+ AM_PROG_LIBTOOL
  
  dnl These should be inherited in the recursive make, but ensure they are
*** ./libf2c/aclocal.m4.orig	Sun Sep 30 21:37:35 2001
--- ./libf2c/aclocal.m4	Sun Sep 30 14:13:20 2001
***************
*** 0 ****
--- 1,7 ----
+ sinclude(../libtool.m4)
+ dnl The lines below arrange for aclocal not to bring an installed
+ dnl libtool.m4 into aclocal.m4, while still arranging for automake to
+ dnl add a definition of LIBTOOL to Makefile.in.
+ ifelse(,,,[AC_SUBST(LIBTOOL)
+ AC_DEFUN([AM_PROG_LIBTOOL])
+ ])

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]