summaryrefslogtreecommitdiff
path: root/configure.host
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-11-13 12:42:54 +0100
committerRichard Henderson <rth@twiddle.net>2014-11-13 12:42:54 +0100
commit57f52484573613e2def21171184f50bd72209cac (patch)
treea8e1a6706e059351c0a72e13ec17da85c4fc1371 /configure.host
parentf8632815a6515a6709802ad23909585664ba1b9d (diff)
downloadlibffi-57f52484573613e2def21171184f50bd72209cac.tar.gz
configure: Split out configure.host
Split out the host case statement to a separate file, so that we don't have to regenerate configure.in for changes therein.
Diffstat (limited to 'configure.host')
-rw-r--r--configure.host193
1 files changed, 193 insertions, 0 deletions
diff --git a/configure.host b/configure.host
new file mode 100644
index 0000000..e6e3558
--- /dev/null
+++ b/configure.host
@@ -0,0 +1,193 @@
+# configure.host
+#
+# This shell script handles all host based configuration for libffi.
+#
+
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host}" in
+ aarch64*-*-*)
+ TARGET=AARCH64; TARGETDIR=aarch64
+ ;;
+
+ alpha*-*-*)
+ TARGET=ALPHA; TARGETDIR=alpha;
+ # Support 128-bit long double, changeable via command-line switch.
+ HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)'
+ ;;
+
+ arc*-*-*)
+ TARGET=ARC; TARGETDIR=arc
+ ;;
+
+ arm*-*-*)
+ TARGET=ARM; TARGETDIR=arm
+ ;;
+
+ avr32*-*-*)
+ TARGET=AVR32; TARGETDIR=avr32
+ ;;
+
+ bfin*)
+ TARGET=BFIN; TARGETDIR=bfin
+ ;;
+
+ cris-*-*)
+ TARGET=LIBFFI_CRIS; TARGETDIR=cris
+ ;;
+
+ frv-*-*)
+ TARGET=FRV; TARGETDIR=frv
+ ;;
+
+ hppa*-*-linux* | parisc*-*-linux* | hppa*-*-openbsd*)
+ TARGET=PA_LINUX; TARGETDIR=pa
+ ;;
+ hppa*64-*-hpux*)
+ TARGET=PA64_HPUX; TARGETDIR=pa
+ ;;
+ hppa*-*-hpux*)
+ TARGET=PA_HPUX; TARGETDIR=pa
+ ;;
+
+ i?86-*-freebsd* | i?86-*-openbsd*)
+ TARGET=X86_FREEBSD; TARGETDIR=x86
+ ;;
+
+ i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix* \
+ | x86_64-*-cygwin* | x86_64-*-mingw*)
+ TARGETDIR=x86
+ if test $ac_cv_sizeof_size_t = 4; then
+ TARGET=X86_WIN32
+ else
+ TARGET=X86_WIN64
+ fi
+ # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
+ # We must also check with_cross_host to decide if this is a native
+ # or cross-build and select where to install dlls appropriately.
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
+ else
+ AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
+ fi
+ ;;
+
+ i?86-*-darwin* | x86_64-*-darwin*)
+ TARGET=X86_DARWIN; TARGETDIR=x86
+ ;;
+
+ i?86-*-* | x86_64-*-* | amd64-*)
+ TARGETDIR=x86
+ if test $ac_cv_sizeof_size_t = 4; then
+ case "$host" in
+ *-gnux32)
+ TARGET=X86_64
+ ;;
+ *)
+ TARGET=X86
+ ;;
+ esac
+ else
+ TARGET=X86_64;
+ fi
+ ;;
+
+ ia64*-*-*)
+ TARGET=IA64; TARGETDIR=ia64
+ ;;
+
+ m32r*-*-*)
+ TARGET=M32R; TARGETDIR=m32r
+ ;;
+
+ m68k-*-*)
+ TARGET=M68K; TARGETDIR=m68k
+ ;;
+
+ m88k-*-*)
+ TARGET=M88K; TARGETDIR=m88k
+ ;;
+
+ microblaze*-*-*)
+ TARGET=MICROBLAZE; TARGETDIR=microblaze
+ ;;
+
+ moxie-*-*)
+ TARGET=MOXIE; TARGETDIR=moxie
+ ;;
+
+ metag-*-*)
+ TARGET=METAG; TARGETDIR=metag
+ ;;
+
+ mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
+ TARGET=MIPS; TARGETDIR=mips
+ ;;
+ mips*-*linux* | mips*-*-openbsd*)
+ # Support 128-bit long double for NewABI.
+ HAVE_LONG_DOUBLE='defined(__mips64)'
+ TARGET=MIPS; TARGETDIR=mips
+ ;;
+
+ nios2*-linux*)
+ TARGET=NIOS2; TARGETDIR=nios2
+ ;;
+
+ or1k*-linux*)
+ TARGET=OR1K; TARGETDIR=or1k
+ ;;
+
+ powerpc*-*-linux* | powerpc-*-sysv*)
+ TARGET=POWERPC; TARGETDIR=powerpc
+ HAVE_LONG_DOUBLE_VARIANT=1
+ ;;
+ powerpc-*-amigaos*)
+ TARGET=POWERPC; TARGETDIR=powerpc
+ ;;
+ powerpc-*-beos*)
+ TARGET=POWERPC; TARGETDIR=powerpc
+ ;;
+ powerpc-*-darwin* | powerpc64-*-darwin*)
+ TARGET=POWERPC_DARWIN; TARGETDIR=powerpc
+ ;;
+ powerpc-*-aix* | rs6000-*-aix*)
+ TARGET=POWERPC_AIX; TARGETDIR=powerpc
+ ;;
+ powerpc-*-freebsd* | powerpc-*-openbsd*)
+ TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
+ HAVE_LONG_DOUBLE_VARIANT=1
+ ;;
+ powerpc64-*-freebsd*)
+ TARGET=POWERPC; TARGETDIR=powerpc
+ ;;
+ powerpc*-*-rtems*)
+ TARGET=POWERPC; TARGETDIR=powerpc
+ ;;
+
+ s390-*-* | s390x-*-*)
+ TARGET=S390; TARGETDIR=s390
+ ;;
+
+ sh-*-* | sh[[34]]*-*-*)
+ TARGET=SH; TARGETDIR=sh
+ ;;
+ sh64-*-* | sh5*-*-*)
+ TARGET=SH64; TARGETDIR=sh64
+ ;;
+
+ sparc*-*-*)
+ TARGET=SPARC; TARGETDIR=sparc
+ ;;
+
+ tile*-*)
+ TARGET=TILE; TARGETDIR=tile
+ ;;
+
+ vax-*-*)
+ TARGET=VAX; TARGETDIR=vax
+ ;;
+
+ xtensa*-*)
+ TARGET=XTENSA; TARGETDIR=xtensa
+ ;;
+esac