summaryrefslogtreecommitdiff
path: root/math/atlas/files/patch-config.c
blob: 84e0fee4d10f61bb28abf7356c8a274e1b224938 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
--- config.c.orig	Mon Jun 23 00:58:35 2003
+++ config.c	Sat Jun 28 16:44:25 2003
@@ -708,7 +708,7 @@
             else if (mach == IA64Itan || MachIsUS(mach) ||
                      mach == Dec21164 || mach == Dec21264)
             {
-               if (major == 3)
+               if ((major == 2 && minor < 96) || (major == 3)) /* Nasty hack for FreeBSD/Alpha STABLE */
                {
                   strcpy(goodgcc, files[i]);
                   return(0);
@@ -1114,7 +1114,9 @@
    switch(OS)
    {
    case OSOSX:  /* don't know answer */
-   case OSFreeBSD:  /* don't know answer */
+   case OSFreeBSD:
+     if (THREADS) strcpy(LIBS, "%%PTHREAD_LIBS%% -lm");
+     break;
    case OSLinux:
       break;
    case OSSunOS:
@@ -1252,6 +1254,11 @@
                "-mcpu=ultrasparc -mtune=ultrasparc -fomit-frame-pointer -O3");
       }
       if (OS == OSFreeBSD && F77) strcpy(F77, "f77");
+      if (OS == OSFreeBSD && THREADS) { 
+              strcat(F77FLAGS, "%%PTHREAD_CFLAGS%%");
+              strcat(CCFLAGS, "%%PTHREAD_CFLAGS%%");
+              strcat(MMFLAGS, "%%PTHREAD_CFLAGS%%");
+     }
       break;
    case OSSunOS:
       np = 3;
@@ -2116,7 +2123,10 @@
          if (!CmndOneLine(targ, "sysctl hw.model", ln))
          {
             if (strstr(ln, "433au")) mach = Dec21164;
+            else if (strstr(ln, "500au")) mach = Dec21164;
+            else if (strstr(ln, "AlphaPC 164")) mach = Dec21164;
             else if (strstr(ln, "XP1000")) mach = Dec21264;
+            else mach = Dec21264;
          }
          break;
       case LAIA64: /* don't know */
@@ -2125,14 +2135,22 @@
          if (!CmndOneLine(targ, "sysctl hw.model", ln))
          {
             if (strstr(ln, "Pentium Pro")) mach = IntPPRO;
+            else if (strstr(ln, "Pentium(R) Pro")) mach = IntPPRO;
+            else if (strstr(ln, "Pentium 4")) mach = IntP4;
+	    else if (strstr(ln, "Pentium(R) 4")) mach = IntP4;
             else if (strstr(ln, "Pentium III")) mach = IntPIII;
+            else if (strstr(ln, "Pentium(R) III")) mach = IntPIII;
             else if (strstr(ln, "Pentium II ")) mach = IntPII;
+            else if (strstr(ln, "Pentium(R) II ")) mach = IntPII;
+            else if (strstr(ln, "Celeron")) mach = IntPII;
+            else if (strstr(ln, "Celeron(R)")) mach = IntPII;
             else if (strstr(ln, "Athlon")) mach = AmdAthlon;
             else if (strstr(ln, "AMD-K7")) mach = AmdAthlon;
             else if (strstr(ln, "32 bit Hammer")) mach = AmdHammer32;
             else if (strstr(ln, "64 bit Hammer")) mach = AmdHammer64;
             else if (strstr(ln, "Pentium/P55C")) mach = IntP5MMX; /* sent by */
             else if (strstr(ln, "Pentium")) mach=IntP5;       /* Nakata Maho */
+            else mach = IntP5;
          }
          break;
       default:;
@@ -3136,6 +3154,9 @@
    }
    if (USEWINF77) strcpy(F77, "$(BINdir)/winf77.exe");
 
+   fpout = fopen("ARCHNAME", "w");
+   fprintf(fpout, "%s", ARCH);
+   fclose(fpout);
    ATL_mprintf(2, fplog, stdout,"\nCreating make include file Make.%s\n", ARCH);
    sprintf(ln, "Make.%s", ARCH);
    fpout = fopen(ln, "w");