/[gxemul]/trunk/configure
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/configure

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC revision 14 by dpavlin, Mon Oct 8 16:18:51 2007 UTC
# Line 27  Line 27 
27  #  SUCH DAMAGE.  #  SUCH DAMAGE.
28  #  #
29  #  #
30  #  $Id: configure,v 1.140 2005/06/27 17:31:50 debug Exp $  #  $Id: configure,v 1.170 2005/10/07 15:09:59 debug Exp $
31  #  #
32  #  This is a minimal configure script, hardcoded for GXemul. This script  #  This is a minimal configure script, hardcoded for GXemul. This script
33  #  figures out which compiler flags will work, and creates Makefiles in  #  figures out which compiler flags will work, and creates Makefiles in
# Line 58  Line 58 
58  #  #
59  ###############################################################################  ###############################################################################
60    
61  ENABLEARM=YES  #  Figure out if this is a stable version (0.x.x).
62  ENABLEMIPS=YES  X=`basename \`pwd\`|cut -d \- -f 2-|cut -c1-2`
63  ENABLEPPC=YES  if [ z"$X" = z0. ]; then
64  ENABLEURISC=YES          #  Stable:
65  ENABLEX86=NO          ENABLEARM=YES
66  STABLE=NO          ENABLEMIPS=YES
67    else
68            #  Development:
69            ENABLEALPHA=YES
70            ENABLEARM=YES
71            ENABLEAVR=NO
72            ENABLEHPPA=NO
73            ENABLEI960=NO
74            ENABLEIA64=NO
75            ENABLEM68K=NO
76            ENABLEMIPS=YES
77            ENABLEPPC=YES
78            ENABLESH=NO
79            ENABLESPARC=NO
80            ENABLEX86=NO
81    fi
82    
83  if [ z"$*" != z ]; then  if [ z"$*" != z ]; then
84          #  Parse command line options:          #  Parse command line options:
# Line 82  if [ z"$*" != z ]; then Line 97  if [ z"$*" != z ]; then
97                          MIPS16=NO                          MIPS16=NO
98                  else if [ z$a = z--enable-mips16 ]; then                  else if [ z$a = z--enable-mips16 ]; then
99                          MIPS16=YES                          MIPS16=YES
100                    else if [ z$a = z--enable-all ]; then
101                            ENABLEALPHA=YES
102                            ENABLEARM=YES
103                            ENABLEAVR=YES
104                            ENABLEHPPA=YES
105                            ENABLEI960=YES
106                            ENABLEIA64=YES
107                            ENABLEM68K=YES
108                            ENABLEMIPS=YES
109                            ENABLEPPC=YES
110                            ENABLESH=YES
111                            ENABLESPARC=YES
112                            ENABLEX86=YES
113                    else if [ z$a = z--disable-alpha ]; then
114                            ENABLEALPHA=NO
115                    else if [ z$a = z--enable-alpha ]; then
116                            ENABLEALPHA=YES
117                  else if [ z$a = z--disable-arm ]; then                  else if [ z$a = z--disable-arm ]; then
118                          ENABLEARM=NO                          ENABLEARM=NO
119                  else if [ z$a = z--enable-arm ]; then                  else if [ z$a = z--enable-arm ]; then
120                          ENABLEARM=YES                          ENABLEARM=YES
121                    else if [ z$a = z--disable-avr ]; then
122                            ENABLEAVR=NO
123                    else if [ z$a = z--enable-avr ]; then
124                            ENABLEAVR=YES
125                    else if [ z$a = z--disable-hppa ]; then
126                            ENABLEHPPA=NO
127                    else if [ z$a = z--enable-hppa ]; then
128                            ENABLEHPPA=YES
129                    else if [ z$a = z--disable-i960 ]; then
130                            ENABLEI960=NO
131                    else if [ z$a = z--enable-i960 ]; then
132                            ENABLEI960=YES
133                    else if [ z$a = z--disable-ia64 ]; then
134                            ENABLEIA64=NO
135                    else if [ z$a = z--enable-ia64 ]; then
136                            ENABLEIA64=YES
137                    else if [ z$a = z--disable-m68k ]; then
138                            ENABLEM68K=NO
139                    else if [ z$a = z--enable-m68k ]; then
140                            ENABLEM86K=YES
141                  else if [ z$a = z--disable-mips ]; then                  else if [ z$a = z--disable-mips ]; then
142                          ENABLEMIPS=NO                          ENABLEMIPS=NO
143                  else if [ z$a = z--enable-mips ]; then                  else if [ z$a = z--enable-mips ]; then
# Line 94  if [ z"$*" != z ]; then Line 146  if [ z"$*" != z ]; then
146                          ENABLEPPC=NO                          ENABLEPPC=NO
147                  else if [ z$a = z--enable-ppc ]; then                  else if [ z$a = z--enable-ppc ]; then
148                          ENABLEPPC=YES                          ENABLEPPC=YES
149                  else if [ z$a = z--disable-urisc ]; then                  else if [ z$a = z--disable-sh ]; then
150                          ENABLEURISC=NO                          ENABLESH=NO
151                  else if [ z$a = z--enable-urisc ]; then                  else if [ z$a = z--enable-sh ]; then
152                          ENABLEURISC=YES                          ENABLESH=YES
153                    else if [ z$a = z--disable-sparc ]; then
154                            ENABLESPARC=NO
155                    else if [ z$a = z--enable-sparc ]; then
156                            ENABLESPARC=YES
157                  else if [ z$a = z--disable-x86 ]; then                  else if [ z$a = z--disable-x86 ]; then
158                          ENABLEX86=NO                          ENABLEX86=NO
159                  else if [ z$a = z--enable-x86 ]; then                  else if [ z$a = z--enable-x86 ]; then
# Line 112  if [ z"$*" != z ]; then Line 168  if [ z"$*" != z ]; then
168                          CACHES=YES                          CACHES=YES
169                  else if [ z$a = z--help ]; then                  else if [ z$a = z--help ]; then
170                          echo "usage: $0 [options]"                          echo "usage: $0 [options]"
171                          printf "\nDevelopment (debug) options:\n"  
172                          echo "  --always32         enable" \                          printf "\nGeneral options:\n\n"
173                              "ALWAYS_SIGNEXTEND_32 (for hunting down"  
174                          echo "                     32/64-bit bugs)"                          echo "  --disable-bintrans  configure without the" \
175                                "old binary translation subsystem,"
176                            echo "                      even if the host" \
177                                "supports it"
178                            echo "  --disable-x         don't include X11 support"
179    
180                            printf "\nDevelopment (debug) options:\n\n"
181    
182                            echo "  --always32         enable ALWAYS_SIGNEXTEND_32"\
183                                "(for hunting down 32-bit bugs)"
184                          echo "  --tracenull        enable" \                          echo "  --tracenull        enable" \
185                              "TRACE_NULL_CRASHES (for bug hunting)"                              "TRACE_NULL_CRASHES (for bug hunting)"
                         printf "\nGeneral options:\n"  
                         echo "  --disable-bintrans configure without" \  
                             "bintrans, even if the host supports it"  
186                          printf "  --enable-caches    enable cache emulation"                          printf "  --enable-caches    enable cache emulation"
187                          printf " (BUGGY)\n"                          printf " (BUGGY)\n"
188                          echo "  --enable-delays    enable instruction" \                          echo "  --enable-delays    enable instruction" \
189                              "latency/delay emulation"                              "latency/delay emulation"
190                          echo "  --disable-x        don't include X11 support"  
191                          printf "\nCPU selection options:\n"                          printf "  --enable-all       enable everything\n"
192                          echo "  --disable-arm      disable ARM CPU emulation"  
193                          echo "  --disable-mips     disable MIPS CPU emulation"                          if [ z$ENABLEALPHA = zYES ]; then
194                          echo "  --disable-ppc      disable PPC CPU emulation"                                  printf "  --disable-alpha    disable "
195                          echo "  --disable-urisc    disable URISC CPU emulation"                          else
196                          if [ z$STABLE = zNO ]; then                                  printf "  --enable-alpha     enable "
197                                  printf "  --enable-x86       "                          fi
198                                  printf "enable x86 CPU emulation"                          printf "Alpha CPU emulation\n"
199                                  printf " (NOT YET)\n"  
200                            if [ z$ENABLEARM = zYES ]; then
201                                    printf "  --disable-arm      disable "
202                            else
203                                    printf "  --enable-arm       enable "
204                            fi
205                            printf "ARM CPU emulation\n"
206    
207                            if [ z$ENABLEAVR = zYES ]; then
208                                    printf "  --disable-avr      disable "
209                            else
210                                    printf "  --enable-avr       enable "
211                            fi
212                            printf "Atmel AVR CPU emulation\n"
213    
214                            if [ z$ENABLEHPPA = zYES ]; then
215                                    printf "  --disable-hppa     disable "
216                            else
217                                    printf "  --enable-hppa      enable "
218                            fi
219                            printf "HPPA CPU emulation\n"
220    
221                            if [ z$ENABLEI960 = zYES ]; then
222                                    printf "  --disable-i960     disable "
223                            else
224                                    printf "  --enable-i960      enable "
225                            fi
226                            printf "i960 CPU emulation\n"
227    
228                            if [ z$ENABLEIA64 = zYES ]; then
229                                    printf "  --disable-ia64     disable "
230                            else
231                                    printf "  --enable-ia64      enable "
232                            fi
233                            printf "IA64 CPU emulation\n"
234    
235                            if [ z$ENABLEM68K = zYES ]; then
236                                    printf "  --disable-m68k     disable "
237                            else
238                                    printf "  --enable-m68k      enable "
239                            fi
240                            printf "M68K CPU emulation\n"
241    
242                            if [ z$ENABLEMIPS = zYES ]; then
243                                    printf "  --disable-mips     disable "
244                            else
245                                    printf "  --enable-mips      enable "
246                            fi
247                            printf "MIPS CPU emulation\n"
248    
249                            if [ z$ENABLEPPC = zYES ]; then
250                                    printf "  --disable-ppc      disable "
251                            else
252                                    printf "  --enable-ppc       enable "
253                          fi                          fi
254                          printf "\nMIPS-specific options:\n"                          printf "POWER/PPC CPU emulation\n"
255                          printf "  --enable-mips16    enable MIPS16 instruction"  
256                          printf " support (NOT YET)\n\n"                          if [ z$ENABLESH = zYES ]; then
257                                    printf "  --disable-sh       disable "
258                            else
259                                    printf "  --enable-sh        enable "
260                            fi
261                            printf "SH CPU emulation\n"
262    
263                            if [ z$ENABLESPARC = zYES ]; then
264                                    printf "  --disable-sparc    disable "
265                            else
266                                    printf "  --enable-sparc     enable "
267                            fi
268                            printf "SPARC CPU emulation\n"
269    
270                            if [ z$ENABLEX86 = zYES ]; then
271                                    printf "  --disable-x86      disable "
272                            else
273                                    printf "  --enable-x86       enable "
274                            fi
275                            printf "x86 CPU emulation\n"
276    
277                            echo "  --enable-mips16    enable MIPS16 support"
278    
279                            printf "\n(Pretty much all of these options are only"
280                            printf " meaningful during the development of\nthe"
281                            printf " emulator, and should not be used when "
282                            printf "compiling a stable version.)\n"
283                          exit                          exit
284                  else                  else
285                          echo "Invalid option: $a"                          echo "Invalid option: $a"
286                          echo "Run  $0 --help  to get a list of" \                          echo "Run  $0 --help  to get a list of" \
287                              "available options."                              "available options."
288                          exit                          exit
289                  fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi                  fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi
290                  fi; fi; fi; fi; fi; fi; fi                  fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi
291                    fi; fi; fi; fi; fi
292          done          done
293  fi  fi
294    
# Line 187  if [ z$MIPS16 = zYES ]; then Line 329  if [ z$MIPS16 = zYES ]; then
329          printf 'NOTE: MIPS16 support is not really working yet.\n'          printf 'NOTE: MIPS16 support is not really working yet.\n'
330          printf "#define ENABLE_MIPS16\n" >> config.h          printf "#define ENABLE_MIPS16\n" >> config.h
331  fi  fi
332    if [ z$ENABLEALPHA = zYES ]; then
333            printf "#define ENABLE_ALPHA\n" >> config.h
334            CPU_ARCHS="$CPU_ARCHS cpu_alpha.o cpu_alpha_palcode.o"
335            CPU_TOOLS="$CPU_TOOLS generate_alpha_misc"
336    fi
337  if [ z$ENABLEARM = zYES ]; then  if [ z$ENABLEARM = zYES ]; then
338          printf "#define ENABLE_ARM\n" >> config.h          printf "#define ENABLE_ARM\n" >> config.h
339            CPU_ARCHS="$CPU_ARCHS cpu_arm.o cpu_arm_coproc.o memory_arm.o "
340            CPU_ARCHS="$CPU_ARCHS tmp_arm_dpi.o tmp_arm_loadstore.o"
341            CPU_TOOLS="$CPU_TOOLS generate_arm_loadstore generate_arm_dpi"
342    fi
343    if [ z$ENABLEAVR = zYES ]; then
344            printf "#define ENABLE_AVR\n" >> config.h
345            CPU_ARCHS="$CPU_ARCHS cpu_avr.o"
346    fi
347    if [ z$ENABLEHPPA = zYES ]; then
348            printf "#define ENABLE_HPPA\n" >> config.h
349            CPU_ARCHS="$CPU_ARCHS cpu_hppa.o"
350    fi
351    if [ z$ENABLEI960 = zYES ]; then
352            printf "#define ENABLE_I960\n" >> config.h
353            CPU_ARCHS="$CPU_ARCHS cpu_i960.o"
354    fi
355    if [ z$ENABLEIA64 = zYES ]; then
356            printf "#define ENABLE_IA64\n" >> config.h
357            CPU_ARCHS="$CPU_ARCHS cpu_ia64.o"
358    fi
359    if [ z$ENABLEM68K = zYES ]; then
360            printf "#define ENABLE_M68K\n" >> config.h
361            CPU_ARCHS="$CPU_ARCHS cpu_m68k.o"
362  fi  fi
363  if [ z$ENABLEMIPS = zYES ]; then  if [ z$ENABLEMIPS = zYES ]; then
364          printf "#define ENABLE_MIPS\n" >> config.h          printf "#define ENABLE_MIPS\n" >> config.h
365  fi  fi
366  if [ z$ENABLEPPC = zYES ]; then  if [ z$ENABLEPPC = zYES ]; then
367          printf "#define ENABLE_PPC\n" >> config.h          printf "#define ENABLE_PPC\n" >> config.h
368            CPU_ARCHS="$CPU_ARCHS cpu_ppc.o"
369            CPU_TOOLS="$CPU_TOOLS generate_ppc_loadstore"
370  fi  fi
371  if [ z$ENABLEURISC = zYES ]; then  if [ z$ENABLESH = zYES ]; then
372          printf "#define ENABLE_URISC\n" >> config.h          printf "#define ENABLE_SH\n" >> config.h
373            CPU_ARCHS="$CPU_ARCHS cpu_sh.o"
374    fi
375    if [ z$ENABLESPARC = zYES ]; then
376            printf "#define ENABLE_SPARC\n" >> config.h
377            CPU_ARCHS="$CPU_ARCHS cpu_sparc.o"
378  fi  fi
379  if [ z$ENABLEX86 = zYES ]; then  if [ z$ENABLEX86 = zYES ]; then
380          printf "#define ENABLE_X86\n" >> config.h          printf "#define ENABLE_X86\n" >> config.h
381          if [ z$STABLE = zNO ]; then          CPU_ARCHS="$CPU_ARCHS cpu_x86.o"
                 printf "\nWARNING: X86 emulation enabled, but it isn't really"  
                 printf " working yet.\n\n"  
         else  
                 printf "Not in the stable release.\n"  
                 exit  
         fi  
382  fi  fi
383    
384    
# Line 325  if [ z"$CC" = z ]; then Line 496  if [ z"$CC" = z ]; then
496          fi          fi
497          rm -f _testprog          rm -f _testprog
498    
499          #  Try ccc (FreeBSD/Alpha):  #       #  Try ccc (FreeBSD/Alpha):
500          printf "#!/bin/sh\nccc _testprog.c -o _testprog >" > _test.sh  #       printf "#!/bin/sh\nccc _testprog.c -o _testprog >" > _test.sh
501          printf " /dev/null 2> /dev/null\n" >> _test.sh  #       printf " /dev/null 2> /dev/null\n" >> _test.sh
502          chmod 755 _test.sh  #       chmod 755 _test.sh
503          ./_test.sh > /dev/null 2> /dev/null  #       ./_test.sh > /dev/null 2> /dev/null
504          if [ -x _testprog ]; then  #       if [ -x _testprog ]; then
505                  CC="ccc"  #               CC="ccc"
506          fi  #       fi
507          rm -f _testprog  #       rm -f _testprog
508    
509          rm -f _test.sh          rm -f _test.sh
510  fi  fi
# Line 448  if [ z$OSF1 = zYES ]; then Line 619  if [ z$OSF1 = zYES ]; then
619  fi  fi
620    
621    
622  #  Check for weird 'alpha' define.  #  Check for 'alpha' define.
623  printf "checking for weird 'alpha' define... "  printf "checking for 'alpha' define... "
624  printf "#include <stdio.h>\nint main(int argc, char *argv[]){  printf "#include <stdio.h>\nint main(int argc, char *argv[]){
625  #ifdef alpha  #ifdef alpha
626  printf(\"1\");  printf(\"1\");
# Line 479  fi Line 650  fi
650  rm -f _testm*  rm -f _testm*
651    
652    
 #  Check for weird 'hppa' define.  
 printf "checking for weird 'hppa' define... "  
 printf "#include <stdio.h>\nint main(int argc, char *argv[]){  
 #ifdef hppa  
 printf(\"1\");  
 #undef hppa  
 #ifdef hppa  
 printf(\"2\");  
 #endif  
 #endif  
 printf(\"\\\n\");return 0;}\n" > _testm.c  
 $CC $CFLAGS _testm.c -o _testm 2> /dev/null  
 if [ ! -x _testm ]; then  
         printf "\nWARNING! COULD NOT COMPILE hppa define TEST"  
         printf " PROGRAM AT ALL!\n"  
 else  
         if [ z`./_testm` = z1 ]; then  
                 printf "yes, workaround applied\n"  
                 echo "#undef hppa" >> config.h  
         else  
                 if [ z`./_testm` = z12 ]; then  
                         printf "yes, but workaround not possible\n"  
                         exit  
                 else  
                         printf "no\n"  
                 fi  
         fi  
 fi  
 rm -f _testm*  
   
   
653  #  Some OSes on MIPS seems to define 'mips' to 1. (eg OpenBSD/arc)  #  Some OSes on MIPS seems to define 'mips' to 1. (eg OpenBSD/arc)
654  printf "checking for weird 'mips' define... "  printf "checking for 'mips' define... "
655  printf "#include <stdio.h>\nint main(int argc, char *argv[]){  printf "#include <stdio.h>\nint main(int argc, char *argv[]){
656  #ifdef mips  #ifdef mips
657  printf(\"1\");  printf(\"1\");
# Line 543  rm -f _testm* Line 683  rm -f _testm*
683    
684  #  Similar to the mips define check above, although I don't know if  #  Similar to the mips define check above, although I don't know if
685  #  any OS actually defined ppc like this.  #  any OS actually defined ppc like this.
686  printf "checking for weird 'ppc' define... "  printf "checking for 'ppc' define... "
687  printf "#include <stdio.h>\nint main(int argc, char *argv[]){  printf "#include <stdio.h>\nint main(int argc, char *argv[]){
688  #ifdef ppc  #ifdef ppc
689  printf(\"1\");  printf(\"1\");
# Line 575  rm -f _testm* Line 715  rm -f _testm*
715    
716  #  Similar to the mips define check above, although I don't know if  #  Similar to the mips define check above, although I don't know if
717  #  any OS actually defined sparc like this.  #  any OS actually defined sparc like this.
718  printf "checking for weird 'sparc' define... "  printf "checking for 'sparc' define... "
719  printf "#include <stdio.h>\nint main(int argc, char *argv[]){  printf "#include <stdio.h>\nint main(int argc, char *argv[]){
720  #ifdef sparc  #ifdef sparc
721  printf(\"1\");  printf(\"1\");
# Line 961  rm -f _testoff.c _testoff Line 1101  rm -f _testoff.c _testoff
1101    
1102    
1103  #  Check for u_int8_t etc:  #  Check for u_int8_t etc:
1104    #  These are needed because some header files in src/include/ use u_int*
1105    #  instead of uint*, and I don't have time to rewrite them all.
1106  printf "checking for u_int8_t... "  printf "checking for u_int8_t... "
1107  printf "#include <stdio.h>\n#include <inttypes.h>\n#include <sys/types.h>\n  printf "#include <stdio.h>\n#include <inttypes.h>\n#include <sys/types.h>\n
1108  int main(int argc, char *argv[]){printf(\"%%i\\\n\",  int main(int argc, char *argv[]){printf(\"%%i\\\n\",
# Line 982  if [ ! -x _testuint ]; then Line 1124  if [ ! -x _testuint ]; then
1124          printf "typedef uint8_t u_int8_t;\n" >> config.h          printf "typedef uint8_t u_int8_t;\n" >> config.h
1125          printf "typedef uint16_t u_int16_t;\n" >> config.h          printf "typedef uint16_t u_int16_t;\n" >> config.h
1126          printf "typedef uint32_t u_int32_t;\n" >> config.h          printf "typedef uint32_t u_int32_t;\n" >> config.h
         printf "typedef uint64_t u_int64_t;\n" >> config.h  
1127          printf "uint8_t\n"          printf "uint8_t\n"
1128  else  else
1129          printf "yes\n"          printf "yes\n"
1130  fi  fi
1131  rm -f _testuint.c _testuint  rm -f _testuint.c _testuint
1132    
1133    printf "checking for u_int64_t... "
1134    printf "#include <stdio.h>\n#include <inttypes.h>\n#include <sys/types.h>\n
1135    int main(int argc, char *argv[]){printf(\"%%i\\\n\",
1136     (int)sizeof(u_int64_t));return 0;}\n" > _testuint.c
1137    $CC $CFLAGS _testuint.c -o _testuint 2> /dev/null
1138    if [ ! -x _testuint ]; then
1139            rm -f _testuint*
1140            printf "#include <stdio.h>\n#include <inttypes.h>
1141            \n#include <sys/types.h>\nint main(int argc, char *argv[])
1142            {printf(\"%%i\\\n\", (int)sizeof(uint64_t));return 0;}\n" > _testuint.c
1143            $CC $CFLAGS _testuint.c -o _testuint 2> /dev/null
1144            if [ ! -x _testuint ]; then
1145                    printf "no\n\nERROR: No u_int64_t or uint64_t. Aborting\n"
1146                    #  TODO: Automagically detect using various combinations
1147                    #  of char, int, short, long etc.
1148                    exit
1149            fi
1150    
1151            printf "typedef uint64_t u_int64_t;\n" >> config.h
1152            printf "uint64_t\n"
1153    else
1154            printf "yes\n"
1155    fi
1156    rm -f _testuint.c _testuint
1157    
1158    
1159  ###############################################################################  ###############################################################################
1160  #  #
# Line 1057  fi Line 1223  fi
1223    
1224  ###############################################################################  ###############################################################################
1225    
1226    #  Host byte order?
1227    printf "checking host endianness... "
1228    rm -f _test_end*
1229    printf '#include <stdio.h>
1230    int main(int argc, char *argv[])
1231    {  int x = 1; void *xp = (void *)&x; char *p = (char *)xp;
1232    if (*p) printf("little\\\n"); else printf("big\\\n"); }
1233    ' > _test_end.c
1234    $CC $CFLAGS _test_end.c -o _test_end 2> /dev/null
1235    X=`./_test_end`
1236    echo $X
1237    if [ z$X = zlittle ]; then
1238            printf "#define HOST_LITTLE_ENDIAN\n" >> config.h
1239    else
1240            if [ z$X = zbig ]; then
1241                    printf "#define HOST_BIG_ENDIAN\n" >> config.h
1242            else
1243                    echo "Error! Could not determine host's endianness."
1244                    exit
1245            fi
1246    fi
1247    rm -f _test_end*
1248    
1249    ###############################################################################
1250    
1251  #  Prefetch support?  #  Prefetch support?
1252  printf "checking for asm prefetch support... "  printf "checking for asm prefetch support... "
1253  if [ z"`uname -m`" = zalpha ]; then  if [ z"`uname -m`" = zalpha ]; then
# Line 1086  fi Line 1277  fi
1277  INCLUDE=-Iinclude/  INCLUDE=-Iinclude/
1278  DINCLUDE=-I../include/  DINCLUDE=-I../include/
1279    
1280    rm -f _testprog.c
1281    
1282  echo C compiler flags: $CFLAGS $CWARNINGS  echo C compiler flags: $CFLAGS $CWARNINGS
1283  echo Linker flags: $OTHERLIBS  echo Linker flags: $OTHERLIBS
1284  echo "CWARNINGS=$CWARNINGS" >> _Makefile.header  echo "CWARNINGS=$CWARNINGS" >> _Makefile.header
# Line 1094  echo "INCLUDE=$INCLUDE" >> _Makefile.hea Line 1287  echo "INCLUDE=$INCLUDE" >> _Makefile.hea
1287  echo "DINCLUDE=$DINCLUDE" >> _Makefile.header  echo "DINCLUDE=$DINCLUDE" >> _Makefile.header
1288  echo "CC=$CC" >> _Makefile.header  echo "CC=$CC" >> _Makefile.header
1289  echo "OTHERLIBS=$OTHERLIBS" >> _Makefile.header  echo "OTHERLIBS=$OTHERLIBS" >> _Makefile.header
1290    echo "CPU_ARCHS=$CPU_ARCHS" >> _Makefile.header
1291    echo "CPU_TOOLS=$CPU_TOOLS" >> _Makefile.header
1292  echo "" >> _Makefile.header  echo "" >> _Makefile.header
1293    
1294    
 printf "Regression test setup: (not really needed to build gxemul)\n"  
   
   
 #  64-bit MIPS cross-compiler:  
   
 MIPS=''  
 if [ z$ENABLEMIPS = zYES ]; then  
         printf "Checking for a GNU cross-compiler for 64-bit MIPS... "  
         echo 'int f(int x) { return x; }' > _testprog.c  
   
         for MIPS_TRY in mips64-unknown-elf mips64-elf mips-unknown-elf64; do  
                 printf '#!/bin/sh\n'$MIPS_TRY'-gcc _testprog.c -c\n' > _test.sh  
                 chmod 755 _test.sh  
                 rm -f _testprog.o  
                 ./_test.sh > /dev/null 2> /dev/null  
                 if [ -f _testprog.o ]; then  
                         MIPS=$MIPS_TRY  
                         break  
                 fi  
                 rm -f _testprog.o  
         done  
   
         if [ z$MIPS = z ]; then  
                 echo "none"  
         else  
                 echo $MIPS"-gcc"  
         fi  
 fi  
 rm -f _testprog* _test.sh  
   
 echo "MIPS_CC="$MIPS"-gcc -g -O2 -fno-builtin -fschedule-insns" \  
     "-mips64 -mabi=64" >> _Makefile.header  
 echo "MIPS_AS="$MIPS"-as -mabi=64 -mips64" >> _Makefile.header  
 echo "MIPS_LD="$MIPS"-ld -Ttext 0xa800000000030000 -e main" \  
     "--oformat=elf64-bigmips" >> _Makefile.header  
 echo "" >> _Makefile.header  
   
   
 ##  PPC64 cross-assembler:  
 #  
 #PPC=''  
 #if [ z$ENABLEPPC = zYES ]; then  
 #       printf "Checking for a GNU cross-assembler for 64-bit PPC... "  
 #       echo 'nop' > _testprog.s  
 #  
 #       for a in ppc64 powerpc64; do  
 #         for b in unknown; do  
 #           for c in elf elf64 linux linux64 aix aix5; do  
 #               PPC_TRY=$a-$b-$c  
 #               printf '#!/bin/sh\n'$PPC_TRY'-as _testprog.s' > _test.sh  
 #               printf ' -o _testprog.o\n' >> _test.sh  
 #               chmod 755 _test.sh  
 #               rm -f _testprog.o  
 #               ./_test.sh > /dev/null 2> /dev/null  
 #               if [ -f _testprog.o ]; then  
 #                       PPC=$PPC_TRY  
 #                       break  
 #               fi  
 #               rm -f _testprog.o  
 #           done  
 #         done  
 #       done  
 #  
 #       if [ z$PPC = z ]; then  
 #               echo "none"  
 #       else  
 #               echo $PPC"-as"  
 #       fi  
 #fi  
 #rm -f _testprog* _test.sh  
 #  
 ##echo "PPC_CC="$PPC"-gcc -g -O2 -fno-builtin" >> _Makefile.header  
 #echo "PPC_AS="$PPC"-as" >> _Makefile.header  
 #echo "PPC_LD="$PPC"-ld -e main" >> _Makefile.header  
 #echo "" >> _Makefile.header  
   
   
 ##  SPARC64 cross-compiler:  
 #  
 #SPARC=''  
 #if [ z$ENABLESPARC = zYES ]; then  
 #       printf "Checking for a GNU cross-compiler for 64-bit SPARC... "  
 #       echo 'int f(int x) { return x; }' > _testprog.c  
 #  
 #       for a in sparc64; do  
 #         for b in unknown; do  
 #           for c in elf elf64; do  
 #               SPARC_TRY=$a-$b-$c  
 #               printf '#!/bin/sh\n'$SPARC_TRY'-gcc _testprog.c -c' > _test.sh  
 #               printf ' -o _testprog.o\n' >> _test.sh  
 #               chmod 755 _test.sh  
 #               rm -f _testprog.o  
 #               ./_test.sh > /dev/null 2> /dev/null  
 #               if [ -f _testprog.o ]; then  
 #                       SPARC=$SPARC_TRY  
 #                       break  
 #               fi  
 #               rm -f _testprog.o  
 #           done  
 #         done  
 #       done  
 #  
 #       if [ z$SPARC = z ]; then  
 #               echo "none"  
 #       else  
 #               echo $SPARC"-gcc"  
 #       fi  
 #fi  
 #rm -f _testprog* _test.sh  
 #  
 #echo "SPARC_CC="$SPARC"-gcc -g -O2 -fno-builtin" >> _Makefile.header  
 #echo "SPARC_AS="$SPARC"-as" >> _Makefile.header  
 #echo "SPARC_LD="$SPARC"-ld -e main" >> _Makefile.header  
 #echo "" >> _Makefile.header  
   
   
1295  #  Create the Makefiles:  #  Create the Makefiles:
1296    
1297  for a in . src src/devices src/devices/fonts tests; do  for a in . src src/cpus src/devices src/devices/fonts src/promemul; do
1298          echo "creating $a/Makefile"          echo "creating $a/Makefile"
1299          touch $a/Makefile          touch $a/Makefile
1300          cat _Makefile.header > $a/Makefile          cat _Makefile.header > $a/Makefile

Legend:
Removed from v.10  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.26