--- ./f2c.h0.org 2010-09-27 22:35:30.000000000 +0900 +++ ./f2c.h0 2010-09-27 22:54:22.000000000 +0900 @@ -7,7 +7,7 @@ #ifndef F2C_INCLUDE #define F2C_INCLUDE -#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__alpha__) || defined(__ppc64__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) typedef int integer; typedef unsigned int uinteger; #else @@ -20,7 +20,7 @@ typedef double doublereal; typedef struct { real r, i; } complex; typedef struct { doublereal r, i; } doublecomplex; -#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__alpha__) || defined(__ppc64__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) typedef int logical; #else typedef long int logical; @@ -29,12 +29,12 @@ typedef char logical1; typedef char integer1; #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ -#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__alpha__) || defined(__ppc64__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) typedef long longint; /* system-dependent */ typedef unsigned long ulongint; /* system-dependent */ #else -typedef long long longint; /* system-dependent - oh yeah*/ -typedef unsigned long long ulongint; /* system-dependent - oh yeah*/ +typedef long long longint; /* system-dependent */ +typedef unsigned long long ulongint; /* system-dependent */ #endif #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) #define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) @@ -56,7 +56,7 @@ typedef short ftnlen; typedef short ftnint; #else -#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__alpha__) || defined(__ppc64__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) typedef int flag; typedef int ftnlen; typedef int ftnint; --- ./f2ch.add.org 2009-08-06 06:37:25.000000000 +0900 +++ ./f2ch.add 2010-09-27 22:54:35.000000000 +0900 @@ -158,5 +158,5 @@ extern void z_log(doublecomplex *, doublecomplex *); extern void z_sin(doublecomplex *, doublecomplex *); extern void z_sqrt(doublecomplex *, doublecomplex *); - } +} #endif --- ./makefile.u.org 2010-09-27 22:35:30.000000000 +0900 +++ ./makefile.u 2010-09-28 12:58:28.000000000 +0900 @@ -14,14 +14,15 @@ .SUFFIXES: .c .o CC = cc +LD = ld SHELL = /bin/sh CFLAGS = -O # compile, then strip unnecessary symbols .c.o: $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c - ld -r -x -o $*.xxx $*.o - mv $*.xxx $*.o +# $(LD) -r -x -o $*.xxx $*.o +# mv $*.xxx $*.o ## Under Solaris (and other systems that do not understand ld -x), ## omit -x in the ld line above. ## If your system does not have the ld command, comment out @@ -88,6 +89,9 @@ libf2c.so: $(OFILES) $(CC) -shared -o libf2c.so $(OFILES) +libf2c.2.1.dylib: $(OFILES) + $(CC) -dynamiclib -flat_namespace -undefined suppress -o $@ $(OFILES) -install_name /opt/local/lib/libf2c.dylib -Wl,-compatibility_version -Wl,2 -Wl,-current_version -Wl,2.1 + ### If your system lacks ranlib, you don't need it; see README. f77vers.o: f77vers.c @@ -127,6 +131,7 @@ clean: rm -f *.o arith.h signal1.h sysdep1.h + rm -f *.a *.so *.dylib backspac.o: fio.h close.o: fio.h