summary refs log tree commit diff
path: root/pkgs/servers/x11/xorg/imake.patch
blob: 56ab6334075eadb96f1c8b30241bf2446997969f (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
79
80
81
82
83
84
85
86
87
88
diff -rc imake-orig/imake.c imake-X11R7.0-1.0.1/imake.c
*** imake-orig/imake.c	2005-11-08 07:33:24.000000000 +0100
--- imake-X11R7.0-1.0.1/imake.c	2006-01-11 01:12:57.000000000 +0100
***************
*** 1056,1061 ****
--- 1056,1062 ----
  static void
  get_distrib(FILE *inFile)
  {
+ #if 0
    struct stat sb;
  
    static char* suse = "/etc/SuSE-release";
***************
*** 1101,1106 ****
--- 1102,1108 ----
       * at the content of /etc/debian_version */
      return;
    }
+ #endif  
    /* what's the definitive way to tell what any particular distribution is? */
  
    fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxUnknown");
***************
*** 1349,1402 ****
  static boolean
  get_gcc(char *cmd)
  {
!   struct stat sb;
!     static char* gcc_path[] = {
! # if defined(linux) || \
!      defined(__NetBSD__) || \
!      defined(__OpenBSD__) || \
!      defined(__FreeBSD__) || \
!      defined(__DragonFly__) || \
!      defined(__APPLE__) || \
!      defined(__CYGWIN__) || \
!      defined(__MINGW32__) || \
!      defined(__GNU__) || \
!      defined(__GLIBC__)
! 	"/usr/bin/cc",	/* for Linux PostIncDir */
! # endif
! 	"/usr/local/bin/gcc",
! 	"/opt/gnu/bin/gcc",
! 	"/usr/pkg/bin/gcc"
!     };
! 
! #ifdef CROSSCOMPILE
!     static char* cross_cc_name[] = {
! 	"cc",
! 	"gcc"
!     };
! 
!     if (CrossCompiling) {
! 	int i;
! 	for (i = 0; i < sizeof (cross_cc_name) / sizeof cross_cc_name[0]; i++){
! 	    strcpy (cmd, CrossCompileDir);
! 	    strcat (cmd, "/");
! 	    strcat (cmd, cross_cc_name[i]);
! 	    if (lstat (cmd, &sb) == 0) {
! 		return TRUE;
! 		break;
! 	    }
! 	}
!     } else
! #endif
!       {
! 	int i;
! 	for (i = 0; i < sizeof (gcc_path) / sizeof gcc_path[0]; i++) {
! 	    if (lstat (gcc_path[i], &sb) == 0) {
! 		strcpy (cmd, gcc_path[i]);
! 		return TRUE;
! 	    }
! 	}
!       }
!     return FALSE;
  }
  
  #if defined CROSSCOMPILE || !defined __UNIXOS2__
--- 1351,1358 ----
  static boolean
  get_gcc(char *cmd)
  {
!     strcpy (cmd, "gcc");
!     return TRUE;
  }
  
  #if defined CROSSCOMPILE || !defined __UNIXOS2__