diff options
Diffstat (limited to 'mpn/configure.in')
-rw-r--r-- | mpn/configure.in | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/mpn/configure.in b/mpn/configure.in new file mode 100644 index 000000000..187cf9e9d --- /dev/null +++ b/mpn/configure.in @@ -0,0 +1,165 @@ +# This file is a shell script fragment that supplies the information +# necessary for a configure script to process the program in +# this directory. For more information, look at ../configure. + +configdirs= +srctrigger=powerpc32 +srcname="GNU Multi-Precision library/mpn" + +# per-host: + +# per-target: + +case "${target}" in + sparc9*-*-* | sparc64*-*-* | ultrasparc*-*-*) path="sparc64" ;; + sparc8*-*-* | microsparc*-*-*) + path="sparc32/v8 sparc"; ;; + supersparc*-*-*) + path="sparc32/v8/supersparc sparc32/v8 sparc" + extra_functions="udiv" ;; + sparc*-*-*) path="sparc32" + if [ x$floating_point = xno ] + then extra_functions="udiv_nfp" + else extra_functions="udiv_fp" + fi + ;; + hppa7000*-*-*) path="hppa/hppa1_1 hppa"; extra_functions="udiv_qrnnd" ;; + hppa1.0*-*-*) path="hppa"; extra_functions="udiv_qrnnd" ;; + hppa*-*-*) # assume pa7100 + path="hppa/hppa1_1/pa7100 hppa/hppa1_1 hppa" + extra_functions="udiv_qrnnd" ;; + cray2-cray-unicos* | [xy]mp-cray-unicos* | [ctj]90-cray-unicos*) + path="cray" ;; + alphaev5-*-*) path="alpha/ev5 alpha"; extra_functions="udiv_qrnnd" ;; + alpha*-*-*) path="alpha"; extra_functions="udiv_qrnnd" ;; + am29000*-*-*) path="am29000" ;; + a29k*-*-*) path="am29000" ;; + i[34]86*-*-linuxaout* | i[34]86*-*-linuxoldld* | \ + i[34]86*-*-*bsd*) # x86 running BSD or Linux with a.out + echo '#define BSD_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/x86/syntax.h"' >>asm-syntax.h + path="x86" ;; + i[56]86*-*-linuxaout* | pentium-*-linuxaout* | pentiumpro-*-linuxaout* | \ + i[56]86*-*-linuxoldld* | pentium-*-linuxoldld* | pentiumpro-*-linuxoldld* | \ + i[56]86*-*-*bsd* | pentium-*-*bsd* | pentiumpro-*-*bsd*) + echo '#define BSD_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/x86/syntax.h"' >>asm-syntax.h + path="x86/pentium x86" ;; + i[34]86*-*-*) # x86 with ELF/SysV format + echo '#define ELF_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/x86/syntax.h"' >>asm-syntax.h + path="x86" ;; + i[56]86*-*-* | pentium-*-* | pentiumpro-*-*) # x86 with ELF/SysV format + echo '#define ELF_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/x86/syntax.h"' >>asm-syntax.h + path="x86/pentium x86" ;; + i960*-*-*) path="i960" ;; +# Motorola 68k configurations. Let m68k mean 68020-68040. +# mc68000 or mc68060 configurations need to be specified explicitly + m680[234]0*-*-linuxaout* | m68k*-*-linuxaout*) + echo '#define MIT_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h + path="m68k/mc68020 m68k" ;; + m68060*-*-linuxaout*) + echo '#define MIT_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h + path="m68k" ;; + m680[234]0*-*-linux* | m68k*-*-linux*) + echo '#define ELF_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h + path="m68k/mc68020 m68k" ;; + m68060*-*-linux*) + echo '#define ELF_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h + path="m68k" ;; + m68000*-*-* | m68060*-*-*) + echo '#define MIT_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h + path="m68k/mc68000" ;; + m680[234]0*-*-* | m68k*-*-*) + echo '#define MIT_SYNTAX' >asm-syntax.h + echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h + path="m68k/mc68020 m68k" ;; + m88k*-*-* | m88k*-*-*) path="m88k" ;; + m88110*-*-*) path="m88k/mc88110 m88k" ;; + ns32k*-*-*) path="n32k" ;; + ppc601-*-*) path="power powerpc32" ;; + ppc620-*-* | powerpc64*-*-*) path="powerpc64" ;; + ppc60[234]*-*-* | powerpc*-*-*) path="powerpc32" ;; + pyramid-*-*) path="pyr" ;; + rs6000-*-* | power-*-* | power2-*-*) + path="power"; extra_functions="udiv_w_sdiv" ;; + sh-*-*) path="sh" ;; + sh2-*-*) path="sh/sh2 sh" ;; + mips[34]*-*-*) path="mips3" ;; + mips*-*-irix6*) path="mips3" ;; + mips*-*-*) path="mips2" ;; + vax*-*-*) path="vax"; extra_functions="udiv_w_sdiv" ;; + z8000x*-*-*) path="z8000x"; extra_functions="udiv_w_sdiv" ;; + z8000*-*-*) path="z8000"; extra_functions="udiv_w_sdiv" ;; + clipper*-*-*) path="clipper" ;; + *-*-*) ;; +esac + +case "${target}" in + *-*-linuxaout* | *-*-linuxoldld*) config=bsd.h ;; + *-sysv* | *-solaris* | *-*-linux*) config="sysv.h" ;; + *) config="bsd.h" ;; +esac + +case "${target}" in + i[3456]86*-*-freebsd* | pentium-*-freebsd* | pentiumpro-*-freebsd* | \ + i[3456]86*-*-netbsd* | pentium-*-netbsd* | pentiumpro-*-netbsd*) + target_makefile_frag=config/t-freebsd ;; +esac + + +functions="${extra_functions} inlines add_n addmul_1 cmp divmod_1 \ + divrem divrem_1 dump lshift mod_1 mul mul_1 mul_n random2 rshift sqrtrem \ + sub_n submul_1 get_str set_str scan0 scan1 popcount hamdist gcd_1 \ + pre_mod_1 perfsqr bdivmod gcd gcdext" + +path="$path generic" +mpn_objects= + +for fn in $functions ; do + mpn_objects="$mpn_objects $fn.o" + for dir in $path ; do + rm -f $fn.[Ssc] + if test -f $srcdir/$dir/$fn.S ; then + files="$files $dir/$fn.S" + links="$links $fn.S" + break + elif test -f $srcdir/$dir/$fn.s ; then + files="$files $dir/$fn.s" + links="$links $fn.s" + break + elif test -f $srcdir/$dir/$fn.c ; then + files="$files $dir/$fn.c" + links="$links $fn.c" + break + fi + done +done + +for dir in $path ; do + rm -f gmp-mparam.h + if test -f $srcdir/$dir/gmp-mparam.h ; then + files="$files $dir/gmp-mparam.h" + links="$links gmp-mparam.h" + break + fi +done + +links="sysdep.h $links" +files="$config $files" + +mpn_links=$links + +# post-target: + +sed <Makefile >Makefile.tmp \ + -e "s/MPN_LINKS = .*/MPN_LINKS =${mpn_links}/" \ + -e "s/MPN_OBJECTS = .*/MPN_OBJECTS =${mpn_objects}/" + +mv Makefile.tmp Makefile |