/[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 8 by dpavlin, Mon Oct 8 16:18:19 2007 UTC revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC
# Line 27  Line 27 
27  #  SUCH DAMAGE.  #  SUCH DAMAGE.
28  #  #
29  #  #
30  #  $Id: configure,v 1.134 2005/06/11 20:59:10 debug Exp $  #  $Id: configure,v 1.140 2005/06/27 17:31:50 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  ENABLEARM=YES
 ENABLEARM=NO  
 ENABLEHPPA=NO  
62  ENABLEMIPS=YES  ENABLEMIPS=YES
63  ENABLEPPC=YES  ENABLEPPC=YES
 ENABLESPARC=NO  
64  ENABLEURISC=YES  ENABLEURISC=YES
65  ENABLEX86=NO  ENABLEX86=NO
66  STABLE=YES  STABLE=NO
67    
68  if [ z"$*" != z ]; then  if [ z"$*" != z ]; then
69          #  Parse command line options:          #  Parse command line options:
# Line 81  if [ z"$*" != z ]; then Line 82  if [ z"$*" != z ]; then
82                          MIPS16=NO                          MIPS16=NO
83                  else if [ z$a = z--enable-mips16 ]; then                  else if [ z$a = z--enable-mips16 ]; then
84                          MIPS16=YES                          MIPS16=YES
                 else if [ z$a = z--disable-alpha ]; then  
                         ENABLEALPHA=NO  
                 else if [ z$a = z--enable-alpha ]; then  
                         ENABLEALPHA=YES  
85                  else if [ z$a = z--disable-arm ]; then                  else if [ z$a = z--disable-arm ]; then
86                          ENABLEARM=NO                          ENABLEARM=NO
87                  else if [ z$a = z--enable-arm ]; then                  else if [ z$a = z--enable-arm ]; then
88                          ENABLEARM=YES                          ENABLEARM=YES
                 else if [ z$a = z--disable-hppa ]; then  
                         ENABLEHPPA=NO  
                 else if [ z$a = z--enable-hppa ]; then  
                         ENABLEHPPA=YES  
89                  else if [ z$a = z--disable-mips ]; then                  else if [ z$a = z--disable-mips ]; then
90                          ENABLEMIPS=NO                          ENABLEMIPS=NO
91                  else if [ z$a = z--enable-mips ]; then                  else if [ z$a = z--enable-mips ]; then
# Line 101  if [ z"$*" != z ]; then Line 94  if [ z"$*" != z ]; then
94                          ENABLEPPC=NO                          ENABLEPPC=NO
95                  else if [ z$a = z--enable-ppc ]; then                  else if [ z$a = z--enable-ppc ]; then
96                          ENABLEPPC=YES                          ENABLEPPC=YES
                 else if [ z$a = z--disable-sparc ]; then  
                         ENABLESPARC=NO  
                 else if [ z$a = z--enable-sparc ]; then  
                         ENABLESPARC=YES  
97                  else if [ z$a = z--disable-urisc ]; then                  else if [ z$a = z--disable-urisc ]; then
98                          ENABLEURISC=NO                          ENABLEURISC=NO
99                  else if [ z$a = z--enable-urisc ]; then                  else if [ z$a = z--enable-urisc ]; then
# Line 138  if [ z"$*" != z ]; then Line 127  if [ z"$*" != z ]; then
127                              "latency/delay emulation"                              "latency/delay emulation"
128                          echo "  --disable-x        don't include X11 support"                          echo "  --disable-x        don't include X11 support"
129                          printf "\nCPU selection options:\n"                          printf "\nCPU selection options:\n"
130                          if [ z$STABLE = zNO ]; then                          echo "  --disable-arm      disable ARM CPU emulation"
                                 printf "  --enable-alpha     "  
                                 printf "enable Alpha CPU emulation"  
                                 printf " (NOT YET)\n"  
                                 printf "  --enable-arm       "  
                                 printf "enable ARM CPU emulation"  
                                 printf " (NOT YET)\n"  
                                 printf "  --enable-hppa      "  
                                 printf "enable HPPA CPU emulation"  
                                 printf " (NOT YET)\n"  
                         fi  
131                          echo "  --disable-mips     disable MIPS CPU emulation"                          echo "  --disable-mips     disable MIPS CPU emulation"
132                          echo "  --disable-ppc      disable PPC CPU emulation"                          echo "  --disable-ppc      disable PPC CPU emulation"
                         if [ z$STABLE = zNO ]; then  
                                 printf "  --enable-sparc     "  
                                 printf "enable SPARC CPU emulation"  
                                 printf " (NOT YET)\n"  
                         fi  
133                          echo "  --disable-urisc    disable URISC CPU emulation"                          echo "  --disable-urisc    disable URISC CPU emulation"
134                          if [ z$STABLE = zNO ]; then                          if [ z$STABLE = zNO ]; then
135                                  printf "  --enable-x86       "                                  printf "  --enable-x86       "
# Line 172  if [ z"$*" != z ]; then Line 146  if [ z"$*" != z ]; then
146                              "available options."                              "available options."
147                          exit                          exit
148                  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
149                  fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi                  fi; fi; fi; fi; fi; fi; fi
150          done          done
151  fi  fi
152    
# Line 196  printf "/* Line 170  printf "/*
170  #  Figure out if VERSION should be defined.  #  Figure out if VERSION should be defined.
171  X=`basename \`pwd\`|cut -d \- -f 2-`  X=`basename \`pwd\`|cut -d \- -f 2-`
172  if [ z"$X" = zgxemul ]; then  if [ z"$X" = zgxemul ]; then
173          echo '#  No VERSION defined.' >> _Makefile.header          echo '/*  No VERSION defined.  */' >> config.h
174  else  else
175          printf "#define VERSION \"$X\"\n" >> config.h          printf "#define VERSION \"$X\"\n" >> config.h
176  fi  fi
# Line 213  if [ z$MIPS16 = zYES ]; then Line 187  if [ z$MIPS16 = zYES ]; then
187          printf 'NOTE: MIPS16 support is not really working yet.\n'          printf 'NOTE: MIPS16 support is not really working yet.\n'
188          printf "#define ENABLE_MIPS16\n" >> config.h          printf "#define ENABLE_MIPS16\n" >> config.h
189  fi  fi
 if [ z$ENABLEALPHA = zYES ]; then  
         printf "#define ENABLE_ALPHA\n" >> config.h  
         if [ z$STABLE = zNO ]; then  
                 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  
 fi  
190  if [ z$ENABLEARM = zYES ]; then  if [ z$ENABLEARM = zYES ]; then
191          printf "#define ENABLE_ARM\n" >> config.h          printf "#define ENABLE_ARM\n" >> config.h
         if [ z$STABLE = zNO ]; then  
                 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  
 fi  
 if [ z$ENABLEHPPA = zYES ]; then  
         printf "#define ENABLE_HPPA\n" >> config.h  
         if [ z$STABLE = zNO ]; then  
                 printf "\nWARNING: HPPA emulation enabled, but it isn't really"  
                 printf " implemented yet.\n\n"  
         else  
                 printf "Not in the stable release.\n"  
                 exit  
         fi  
192  fi  fi
193  if [ z$ENABLEMIPS = zYES ]; then  if [ z$ENABLEMIPS = zYES ]; then
194          printf "#define ENABLE_MIPS\n" >> config.h          printf "#define ENABLE_MIPS\n" >> config.h
# Line 249  fi Line 196  fi
196  if [ z$ENABLEPPC = zYES ]; then  if [ z$ENABLEPPC = zYES ]; then
197          printf "#define ENABLE_PPC\n" >> config.h          printf "#define ENABLE_PPC\n" >> config.h
198  fi  fi
 if [ z$ENABLESPARC = zYES ]; then  
         printf "#define ENABLE_SPARC\n" >> config.h  
         if [ z$STABLE = zNO ]; then  
                 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  
199  if [ z$ENABLEURISC = zYES ]; then  if [ z$ENABLEURISC = zYES ]; then
200          printf "#define ENABLE_URISC\n" >> config.h          printf "#define ENABLE_URISC\n" >> config.h
201  fi  fi
# Line 871  fi Line 808  fi
808  rm -f _testr.[co] _testr  rm -f _testr.[co] _testr
809    
810    
811    #  strlcpy missing?
812    printf "checking for strlcpy... "
813    printf "#include <string.h>
814    int main(int argc, char *argv[]) { char *p; char *q; size_t x;
815      x = strlcpy(p, q, 50); return 0;}\n" > _tests.c
816    $CC $CFLAGS _tests.c -o _tests 2> /dev/null
817    if [ ! -x _tests ]; then
818            printf "missing, using mystrlcpy\n"
819            printf "#define strlcpy mystrlcpy\n" >> config.h
820            printf "#define strlcat mystrlcat\n" >> config.h
821            printf "#define USE_STRLCPY_REPLACEMENTS\n" >> config.h
822    else
823            printf "found\n"
824    fi
825    rm -f _tests.[co] _tests
826    
827    
828  #  strtoull missing?  #  strtoull missing?
829  printf "checking for strtoull... "  printf "checking for strtoull... "
830  printf "#include <stdlib.h>  printf "#include <stdlib.h>
# Line 1146  echo "" >> _Makefile.header Line 1100  echo "" >> _Makefile.header
1100  printf "Regression test setup: (not really needed to build gxemul)\n"  printf "Regression test setup: (not really needed to build gxemul)\n"
1101    
1102    
 ##  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  
   
   
1103  #  64-bit MIPS cross-compiler:  #  64-bit MIPS cross-compiler:
1104    
1105  MIPS=''  MIPS=''

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

  ViewVC Help
Powered by ViewVC 1.1.26