/[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 6 by dpavlin, Mon Oct 8 16:18:11 2007 UTC revision 12 by dpavlin, Mon Oct 8 16:18:38 2007 UTC
# Line 27  Line 27 
27  #  SUCH DAMAGE.  #  SUCH DAMAGE.
28  #  #
29  #  #
30  #  $Id: configure,v 1.132 2005/06/04 12:05:50 debug Exp $  #  $Id: configure,v 1.155 2005/08/16 05:37:08 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 52  Line 52 
52  #    o)  prefetch capability  (TODO: this is assumed on Alpha, but not all  #    o)  prefetch capability  (TODO: this is assumed on Alpha, but not all
53  #                              Alphas have it...)  #                              Alphas have it...)
54  #  #
55    #  TODO:
56    #    o)  do not enable prefetch on Alpha ev4 or ev5, only on pca56 and newer
57    #    o)  X11 libs and includes via command line options?
58    #
59  ###############################################################################  ###############################################################################
60    
61  ENABLEALPHA=NO  #  Figure out if this is a stable version (0.x.x).
62  ENABLEARM=NO  X=`basename \`pwd\`|cut -d \- -f 2-|cut -c1-2`
63  ENABLEHPPA=NO  if [ z"$X" = z0. ]; then
64  ENABLEMIPS=YES          #  Stable:
65  ENABLEPPC=YES          ENABLEMIPS=YES
66  ENABLESPARC=NO  else
67  ENABLEURISC=YES          #  Development:
68  ENABLEX86=NO          ENABLEALPHA=YES
69  STABLE=YES          ENABLEARM=YES
70            ENABLEIA64=YES
71            ENABLEM68K=YES
72            ENABLEMIPS=YES
73            ENABLEPPC=YES
74            ENABLESPARC=YES
75            ENABLEX86=YES
76    fi
77    
78  if [ z"$*" != z ]; then  if [ z"$*" != z ]; then
79          #  Parse command line options:          #  Parse command line options:
# Line 71  if [ z"$*" != z ]; then Line 82  if [ z"$*" != z ]; then
82                          NOX11=YES                          NOX11=YES
83                  else if [ z$a = z--always32 ]; then                  else if [ z$a = z--always32 ]; then
84                          ALWAYS32=YES                          ALWAYS32=YES
85                    else if [ z$a = z--tracenull ]; then
86                            TRACENULL=YES
87                  else if [ z$a = z--disable-bintrans ]; then                  else if [ z$a = z--disable-bintrans ]; then
88                          NOBINTRANS=YES                          NOBINTRANS=YES
89                  else if [ z$a = z--enable-bintrans ]; then                  else if [ z$a = z--enable-bintrans ]; then
# Line 87  if [ z"$*" != z ]; then Line 100  if [ z"$*" != z ]; then
100                          ENABLEARM=NO                          ENABLEARM=NO
101                  else if [ z$a = z--enable-arm ]; then                  else if [ z$a = z--enable-arm ]; then
102                          ENABLEARM=YES                          ENABLEARM=YES
103                  else if [ z$a = z--disable-hppa ]; then                  else if [ z$a = z--disable-ia64 ]; then
104                          ENABLEHPPA=NO                          ENABLEIA64=NO
105                  else if [ z$a = z--enable-hppa ]; then                  else if [ z$a = z--enable-ia64 ]; then
106                          ENABLEHPPA=YES                          ENABLEIA64=YES
107                    else if [ z$a = z--disable-m68k ]; then
108                            ENABLEM68K=NO
109                    else if [ z$a = z--enable-m68k ]; then
110                            ENABLEM86K=YES
111                  else if [ z$a = z--disable-mips ]; then                  else if [ z$a = z--disable-mips ]; then
112                          ENABLEMIPS=NO                          ENABLEMIPS=NO
113                  else if [ z$a = z--enable-mips ]; then                  else if [ z$a = z--enable-mips ]; then
# Line 103  if [ z"$*" != z ]; then Line 120  if [ z"$*" != z ]; then
120                          ENABLESPARC=NO                          ENABLESPARC=NO
121                  else if [ z$a = z--enable-sparc ]; then                  else if [ z$a = z--enable-sparc ]; then
122                          ENABLESPARC=YES                          ENABLESPARC=YES
                 else if [ z$a = z--disable-urisc ]; then  
                         ENABLEURISC=NO  
                 else if [ z$a = z--enable-urisc ]; then  
                         ENABLEURISC=YES  
123                  else if [ z$a = z--disable-x86 ]; then                  else if [ z$a = z--disable-x86 ]; then
124                          ENABLEX86=NO                          ENABLEX86=NO
125                  else if [ z$a = z--enable-x86 ]; then                  else if [ z$a = z--enable-x86 ]; then
# Line 121  if [ z"$*" != z ]; then Line 134  if [ z"$*" != z ]; then
134                          CACHES=YES                          CACHES=YES
135                  else if [ z$a = z--help ]; then                  else if [ z$a = z--help ]; then
136                          echo "usage: $0 [options]"                          echo "usage: $0 [options]"
137                          printf "\nDevelopment (debug) options:\n"  
138                          echo "  --always32         enable" \                          printf "\nGeneral options:\n\n"
139                              "ALWAYS_SIGNEXTEND_32 (for hunting down"  
140                          echo "                     32/64-bit bugs)"                          echo "  --disable-bintrans  configure without the" \
141                          printf "\nGeneral options:\n"                              "old binary translation subsystem,"
142                          echo "  --disable-bintrans configure without" \                          echo "                      even if the host" \
143                              "bintrans, even if the host supports it"                              "supports it"
144                            echo "  --disable-x         don't include X11 support"
145    
146                            printf "\nDevelopment (debug) options:\n\n"
147    
148                            echo "  --always32         enable ALWAYS_SIGNEXTEND_32"\
149                                "(for hunting down 32-bit bugs)"
150                            echo "  --tracenull        enable" \
151                                "TRACE_NULL_CRASHES (for bug hunting)"
152                          printf "  --enable-caches    enable cache emulation"                          printf "  --enable-caches    enable cache emulation"
153                          printf " (BUGGY)\n"                          printf " (BUGGY)\n"
154                          echo "  --enable-delays    enable instruction" \                          echo "  --enable-delays    enable instruction" \
155                              "latency/delay emulation"                              "latency/delay emulation"
156                          echo "  --disable-x        don't include X11 support"  
157                          printf "\nCPU selection options:\n"                          if [ z$ENABLEALPHA = zYES ]; then
158                          if [ z$STABLE = zNO ]; then                                  printf "  --disable-alpha    disable "
159                                  printf "  --enable-alpha     "                          else
160                                  printf "enable Alpha CPU emulation"                                  printf "  --enable-alpha     enable "
161                                  printf " (NOT YET)\n"                          fi
162                                  printf "  --enable-arm       "                          printf "Alpha CPU emulation\n"
163                                  printf "enable ARM CPU emulation"  
164                                  printf " (NOT YET)\n"                          if [ z$ENABLEARM = zYES ]; then
165                                  printf "  --enable-hppa      "                                  printf "  --disable-arm      disable "
166                                  printf "enable HPPA CPU emulation"                          else
167                                  printf " (NOT YET)\n"                                  printf "  --enable-arm       enable "
168                            fi
169                            printf "ARM CPU emulation\n"
170    
171                            if [ z$ENABLEIA64 = zYES ]; then
172                                    printf "  --disable-ia64     disable "
173                            else
174                                    printf "  --enable-ia64      enable "
175                            fi
176                            printf "IA64 CPU emulation\n"
177    
178                            if [ z$ENABLEM68K = zYES ]; then
179                                    printf "  --disable-m68k     disable "
180                            else
181                                    printf "  --enable-m68k      enable "
182                            fi
183                            printf "M68K CPU emulation\n"
184    
185                            if [ z$ENABLEMIPS = zYES ]; then
186                                    printf "  --disable-mips     disable "
187                            else
188                                    printf "  --enable-mips      enable "
189                            fi
190                            printf "MIPS CPU emulation\n"
191    
192                            if [ z$ENABLEPPC = zYES ]; then
193                                    printf "  --disable-ppc      disable "
194                            else
195                                    printf "  --enable-ppc       enable "
196                          fi                          fi
197                          echo "  --disable-mips     disable MIPS CPU emulation"                          printf "POWER/PPC CPU emulation\n"
198                          echo "  --disable-ppc      disable PPC CPU emulation"  
199                          if [ z$STABLE = zNO ]; then                          if [ z$ENABLESPARC = zYES ]; then
200                                  printf "  --enable-sparc     "                                  printf "  --disable-sparc    disable "
201                                  printf "enable SPARC CPU emulation"                          else
202                                  printf " (NOT YET)\n"                                  printf "  --enable-sparc     enable "
203                          fi                          fi
204                          echo "  --disable-urisc    disable URISC CPU emulation"                          printf "SPARC CPU emulation\n"
205                          if [ z$STABLE = zNO ]; then  
206                                  printf "  --enable-x86       "                          if [ z$ENABLEX86 = zYES ]; then
207                                  printf "enable x86 CPU emulation"                                  printf "  --disable-x86      disable "
208                                  printf " (NOT YET)\n"                          else
209                                    printf "  --enable-x86       enable "
210                          fi                          fi
211                          printf "\nMIPS-specific options:\n"                          printf "x86 CPU emulation\n"
212                          printf "  --enable-mips16    enable MIPS16 instruction"  
213                          printf " support (NOT YET)\n\n"                          echo "  --enable-mips16    enable MIPS16 support"
214    
215                            printf "\n(Pretty much all of these options are only"
216                            printf " meaningful during the development of\nthe"
217                            printf " emulator, and should not be used when "
218                            printf "compiling a stable version.)\n"
219                          exit                          exit
220                  else                  else
221                          echo "Invalid option: $a"                          echo "Invalid option: $a"
222                          echo "Run  $0 --help  to get a list of" \                          echo "Run  $0 --help  to get a list of" \
223                              "available options."                              "available options."
224                          exit                          exit
225                  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
226                  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
227          done          done
228  fi  fi
229    
# Line 192  printf "/* Line 247  printf "/*
247  #  Figure out if VERSION should be defined.  #  Figure out if VERSION should be defined.
248  X=`basename \`pwd\`|cut -d \- -f 2-`  X=`basename \`pwd\`|cut -d \- -f 2-`
249  if [ z"$X" = zgxemul ]; then  if [ z"$X" = zgxemul ]; then
250          echo '#  No VERSION defined.' >> _Makefile.header          echo '/*  No VERSION defined.  */' >> config.h
251  else  else
252          printf "#define VERSION \"$X\"\n" >> config.h          printf "#define VERSION \"$X\"\n" >> config.h
253  fi  fi
# Line 211  if [ z$MIPS16 = zYES ]; then Line 266  if [ z$MIPS16 = zYES ]; then
266  fi  fi
267  if [ z$ENABLEALPHA = zYES ]; then  if [ z$ENABLEALPHA = zYES ]; then
268          printf "#define ENABLE_ALPHA\n" >> config.h          printf "#define ENABLE_ALPHA\n" >> config.h
269          if [ z$STABLE = zNO ]; then          CPU_ARCHS="$CPU_ARCHS cpu_alpha.o cpu_alpha_palcode.o"
                 printf "\nWARNING: Alpha emulation enabled, but it isn't really"  
                 printf " implemented yet.\n\n"  
         else  
                 printf "Not in the stable release.\n"  
                 exit  
         fi  
270  fi  fi
271  if [ z$ENABLEARM = zYES ]; then  if [ z$ENABLEARM = zYES ]; then
272          printf "#define ENABLE_ARM\n" >> config.h          printf "#define ENABLE_ARM\n" >> config.h
273          if [ z$STABLE = zNO ]; then          CPU_ARCHS="$CPU_ARCHS cpu_arm.o"
                 printf "\nWARNING: ARM emulation enabled, but it isn't really"  
                 printf " implemented yet.\n\n"  
         else  
                 printf "Not in the stable release.\n"  
                 exit  
         fi  
274  fi  fi
275  if [ z$ENABLEHPPA = zYES ]; then  if [ z$ENABLEIA64 = zYES ]; then
276          printf "#define ENABLE_HPPA\n" >> config.h          printf "#define ENABLE_IA64\n" >> config.h
277          if [ z$STABLE = zNO ]; then          CPU_ARCHS="$CPU_ARCHS cpu_ia64.o"
278                  printf "\nWARNING: HPPA emulation enabled, but it isn't really"  fi
279                  printf " implemented yet.\n\n"  if [ z$ENABLEM68K = zYES ]; then
280          else          printf "#define ENABLE_M68K\n" >> config.h
281                  printf "Not in the stable release.\n"          CPU_ARCHS="$CPU_ARCHS cpu_m68k.o"
                 exit  
         fi  
282  fi  fi
283  if [ z$ENABLEMIPS = zYES ]; then  if [ z$ENABLEMIPS = zYES ]; then
284          printf "#define ENABLE_MIPS\n" >> config.h          printf "#define ENABLE_MIPS\n" >> config.h
285  fi  fi
286  if [ z$ENABLEPPC = zYES ]; then  if [ z$ENABLEPPC = zYES ]; then
287          printf "#define ENABLE_PPC\n" >> config.h          printf "#define ENABLE_PPC\n" >> config.h
288            CPU_ARCHS="$CPU_ARCHS cpu_ppc.o"
289  fi  fi
290  if [ z$ENABLESPARC = zYES ]; then  if [ z$ENABLESPARC = zYES ]; then
291          printf "#define ENABLE_SPARC\n" >> config.h          printf "#define ENABLE_SPARC\n" >> config.h
292          if [ z$STABLE = zNO ]; then          CPU_ARCHS="$CPU_ARCHS cpu_sparc.o"
                 printf "\nWARNING: SPARC emulation enabled, but it isn't really"  
                 printf " implemented yet.\n\n"  
         else  
                 printf "Not in the stable release.\n"  
                 exit  
         fi  
 fi  
 if [ z$ENABLEURISC = zYES ]; then  
         printf "#define ENABLE_URISC\n" >> config.h  
293  fi  fi
294  if [ z$ENABLEX86 = zYES ]; then  if [ z$ENABLEX86 = zYES ]; then
295          printf "#define ENABLE_X86\n" >> config.h          printf "#define ENABLE_X86\n" >> config.h
296          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  
297  fi  fi
298    
299    
# Line 277  if [ z$DELAYS = zYES ]; then Line 304  if [ z$DELAYS = zYES ]; then
304  fi  fi
305    
306    
307  #  Instruction delay/latency emulation:  #  Development option: ALWAYS_SIGNEXTEND_32
308  if [ z$ALWAYS32 = zYES ]; then  if [ z$ALWAYS32 = zYES ]; then
309          echo 'Enabling ALWAYS_SIGNEXTEND_32. (NOTE:' \          echo 'Enabling ALWAYS_SIGNEXTEND_32. (NOTE:' \
310              'This slows down everything.)'              'This slows down everything.)'
# Line 285  if [ z$ALWAYS32 = zYES ]; then Line 312  if [ z$ALWAYS32 = zYES ]; then
312  fi  fi
313    
314    
315    #  Development option: TRACE_NULL_CRASHES
316    if [ z$TRACENULL = zYES ]; then
317            echo 'Enabling TRACE_NULL_CRASHES. (NOTE:' \
318                'This slows down the emulator.)'
319            printf "#define TRACE_NULL_CRASHES\n" >> config.h
320    fi
321    
322    
323  #  Cache emulation:  #  Cache emulation:
324  if [ z$CACHES = zYES ]; then  if [ z$CACHES = zYES ]; then
325          echo 'Enabling Cache emulation. (EXPERIMENTAL)'          echo 'Enabling Cache emulation. (EXPERIMENTAL)'
# Line 499  if [ z$OSF1 = zYES ]; then Line 534  if [ z$OSF1 = zYES ]; then
534  fi  fi
535    
536    
537  #  Check for weird 'alpha' define.  #  Check for 'alpha' define.
538  printf "checking for weird 'alpha' define... "  printf "checking for 'alpha' define... "
539  printf "#include <stdio.h>\nint main(int argc, char *argv[]){  printf "#include <stdio.h>\nint main(int argc, char *argv[]){
540  #ifdef alpha  #ifdef alpha
541  printf(\"1\");  printf(\"1\");
# Line 530  fi Line 565  fi
565  rm -f _testm*  rm -f _testm*
566    
567    
 #  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*  
   
   
568  #  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)
569  printf "checking for weird 'mips' define... "  printf "checking for 'mips' define... "
570  printf "#include <stdio.h>\nint main(int argc, char *argv[]){  printf "#include <stdio.h>\nint main(int argc, char *argv[]){
571  #ifdef mips  #ifdef mips
572  printf(\"1\");  printf(\"1\");
# Line 594  rm -f _testm* Line 598  rm -f _testm*
598    
599  #  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
600  #  any OS actually defined ppc like this.  #  any OS actually defined ppc like this.
601  printf "checking for weird 'ppc' define... "  printf "checking for 'ppc' define... "
602  printf "#include <stdio.h>\nint main(int argc, char *argv[]){  printf "#include <stdio.h>\nint main(int argc, char *argv[]){
603  #ifdef ppc  #ifdef ppc
604  printf(\"1\");  printf(\"1\");
# Line 626  rm -f _testm* Line 630  rm -f _testm*
630    
631  #  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
632  #  any OS actually defined sparc like this.  #  any OS actually defined sparc like this.
633  printf "checking for weird 'sparc' define... "  printf "checking for 'sparc' define... "
634  printf "#include <stdio.h>\nint main(int argc, char *argv[]){  printf "#include <stdio.h>\nint main(int argc, char *argv[]){
635  #ifdef sparc  #ifdef sparc
636  printf(\"1\");  printf(\"1\");
# Line 859  fi Line 863  fi
863  rm -f _testr.[co] _testr  rm -f _testr.[co] _testr
864    
865    
866    #  strlcpy missing?
867    printf "checking for strlcpy... "
868    printf "#include <string.h>
869    int main(int argc, char *argv[]) { char *p; char *q; size_t x;
870      x = strlcpy(p, q, 50); return 0;}\n" > _tests.c
871    $CC $CFLAGS _tests.c -o _tests 2> /dev/null
872    if [ ! -x _tests ]; then
873            printf "missing, using mystrlcpy\n"
874            printf "#define strlcpy mystrlcpy\n" >> config.h
875            printf "#define strlcat mystrlcat\n" >> config.h
876            printf "#define USE_STRLCPY_REPLACEMENTS\n" >> config.h
877    else
878            printf "found\n"
879    fi
880    rm -f _tests.[co] _tests
881    
882    
883  #  strtoull missing?  #  strtoull missing?
884  printf "checking for strtoull... "  printf "checking for strtoull... "
885  printf "#include <stdlib.h>  printf "#include <stdlib.h>
# Line 1091  fi Line 1112  fi
1112    
1113  ###############################################################################  ###############################################################################
1114    
1115    #  Host byte order?
1116    printf "checking host endianness... "
1117    rm -f _test_end*
1118    printf '#include <stdio.h>
1119    int main(int argc, char *argv[])
1120    {  int x = 1; void *xp = (void *)&x; char *p = (char *)xp;
1121    if (*p) printf("little\\\n"); else printf("big\\\n"); }
1122    ' > _test_end.c
1123    $CC $CFLAGS _test_end.c -o _test_end 2> /dev/null
1124    X=`./_test_end`
1125    echo $X
1126    if [ z$X = zlittle ]; then
1127            printf "#define HOST_LITTLE_ENDIAN\n" >> config.h
1128    else
1129            if [ z$X = zbig ]; then
1130                    printf "#define HOST_BIG_ENDIAN\n" >> config.h
1131            else
1132                    echo "Error! Could not determine host's endianness."
1133                    exit
1134            fi
1135    fi
1136    rm -f _test_end*
1137    
1138    ###############################################################################
1139    
1140  #  Prefetch support?  #  Prefetch support?
1141  printf "checking for asm prefetch support... "  printf "checking for asm prefetch support... "
1142  if [ z"`uname -m`" = zalpha ]; then  if [ z"`uname -m`" = zalpha ]; then
# Line 1120  fi Line 1166  fi
1166  INCLUDE=-Iinclude/  INCLUDE=-Iinclude/
1167  DINCLUDE=-I../include/  DINCLUDE=-I../include/
1168    
1169    rm -f _testprog.c
1170    
1171  echo C compiler flags: $CFLAGS $CWARNINGS  echo C compiler flags: $CFLAGS $CWARNINGS
1172  echo Linker flags: $OTHERLIBS  echo Linker flags: $OTHERLIBS
1173  echo "CWARNINGS=$CWARNINGS" >> _Makefile.header  echo "CWARNINGS=$CWARNINGS" >> _Makefile.header
# Line 1128  echo "INCLUDE=$INCLUDE" >> _Makefile.hea Line 1176  echo "INCLUDE=$INCLUDE" >> _Makefile.hea
1176  echo "DINCLUDE=$DINCLUDE" >> _Makefile.header  echo "DINCLUDE=$DINCLUDE" >> _Makefile.header
1177  echo "CC=$CC" >> _Makefile.header  echo "CC=$CC" >> _Makefile.header
1178  echo "OTHERLIBS=$OTHERLIBS" >> _Makefile.header  echo "OTHERLIBS=$OTHERLIBS" >> _Makefile.header
1179    echo "CPU_ARCHS=$CPU_ARCHS" >> _Makefile.header
1180  echo "" >> _Makefile.header  echo "" >> _Makefile.header
1181    
1182    
 printf "Regression test setup: (not really needed to build gxemul)\n"  
   
   
 ##  64-bit HPPA cross-assembler:  
 #  
 #HPPA=''  
 #if [ z$ENABLEHPPA = zYES ]; then  
 #       printf "Checking for a GNU cross-assembler for 64-bit HPPA... "  
 #       echo 'nop' > _testprog.s  
 #  
 #       for HPPA_TRY in hppa64-unknown-elf hppa64-elf; do  
 #               printf '#!/bin/sh\n'$HPPA_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  
 #                       HPPA=$HPPA_TRY  
 #                       break  
 #               fi  
 #               rm -f _testprog.o  
 #       done  
 #  
 #       if [ z$HPPA = z ]; then  
 #               echo "none"  
 #       else  
 #               echo $HPPA"-gcc"  
 #       fi  
 #fi  
 #rm -f _testprog* _test.sh  
 #  
 ## TODO: are these ok?  64-bit mode!  
 ##echo "HPPA_CC="$HPPA"-gcc -g -O2 -fno-builtin -fschedule-insns" \  
 ##      >> _Makefile.header  
 #echo "HPPA_AS="$HPPA"-as " >> _Makefile.header  
 #echo "HPPA_LD="$HPPA"-ld -Ttext 0xa800000000030000 -e main" \  
 #    "--oformat=elf64-bigmips" >> _Makefile.header  
 #echo "" >> _Makefile.header  
   
   
 #  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  
   
   
1183  #  Create the Makefiles:  #  Create the Makefiles:
1184    
1185  for a in . src src/devices src/devices/fonts tests; do  for a in . src src/devices src/devices/fonts; do
1186          echo "creating $a/Makefile"          echo "creating $a/Makefile"
1187          touch $a/Makefile          touch $a/Makefile
1188          cat _Makefile.header > $a/Makefile          cat _Makefile.header > $a/Makefile

Legend:
Removed from v.6  
changed lines
  Added in v.12

  ViewVC Help
Powered by ViewVC 1.1.26