| 1 | dnl Process this with autoconf to create configure
|
|---|
| 2 | AC_INIT(fficonfig.h.in)
|
|---|
| 3 | AM_CONFIG_HEADER(fficonfig.h)
|
|---|
| 4 |
|
|---|
| 5 | # This works around the fact that libtool configuration may change LD
|
|---|
| 6 | # for this particular configuration, but some shells, instead of
|
|---|
| 7 | # keeping the changes in LD private, export them just because LD is
|
|---|
| 8 | # exported.
|
|---|
| 9 | ORIGINAL_LD_FOR_MULTILIBS=$LD
|
|---|
| 10 |
|
|---|
| 11 | dnl Default to --enable-multilib
|
|---|
| 12 | AC_ARG_ENABLE(multilib,
|
|---|
| 13 | [ --enable-multilib build many library versions (default)],
|
|---|
| 14 | [case "${enableval}" in
|
|---|
| 15 | yes) multilib=yes ;;
|
|---|
| 16 | no) multilib=no ;;
|
|---|
| 17 | *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
|---|
| 18 | esac], [multilib=yes])dnl
|
|---|
| 19 |
|
|---|
| 20 | dnl We may get other options which we don't document:
|
|---|
| 21 | dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
|---|
| 22 |
|
|---|
| 23 | if test "${srcdir}" = "."; then
|
|---|
| 24 | if test "${with_target_subdir}" != "."; then
|
|---|
| 25 | libffi_basedir="${with_multisrctop}../"
|
|---|
| 26 | else
|
|---|
| 27 | libffi_basedir="${with_multisrctop}"
|
|---|
| 28 | fi
|
|---|
| 29 | else
|
|---|
| 30 | libffi_basedir=
|
|---|
| 31 | fi
|
|---|
| 32 | AC_SUBST(libffi_basedir)
|
|---|
| 33 | AC_CONFIG_AUX_DIR(${libffi_basedir}..)
|
|---|
| 34 |
|
|---|
| 35 | AC_CANONICAL_HOST
|
|---|
| 36 |
|
|---|
| 37 | AM_PROG_LIBTOOL
|
|---|
| 38 |
|
|---|
| 39 | AM_INIT_AUTOMAKE(libffi,2.00-beta,no-define)
|
|---|
| 40 |
|
|---|
| 41 | AC_EXEEXT
|
|---|
| 42 | AM_MAINTAINER_MODE
|
|---|
| 43 |
|
|---|
| 44 | AC_PROG_CC
|
|---|
| 45 | AC_PROG_LIBTOOL
|
|---|
| 46 |
|
|---|
| 47 | TARGETDIR="unknown"
|
|---|
| 48 | case "$host" in
|
|---|
| 49 | mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
|
|---|
| 50 | i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
|
|---|
| 51 | i*86-*-sco3.2v5*) TARGET=X86; TARGETDIR=x86;;
|
|---|
| 52 | i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
|
|---|
| 53 | i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
|
|---|
| 54 | i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
|
|---|
| 55 | i*86-*-netbsdelf*) TARGET=X86; TARGETDIR=x86;;
|
|---|
| 56 | i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
|
|---|
| 57 | i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
|
|---|
| 58 | i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
|
|---|
| 59 | sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
|
|---|
| 60 | sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
|
|---|
| 61 | sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
|
|---|
| 62 | sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
|
|---|
| 63 | alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
|
|---|
| 64 | ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
|
|---|
| 65 | m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
|
|---|
| 66 | mips64*-*);;
|
|---|
| 67 | mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
|
|---|
| 68 | powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
|
|---|
| 69 | powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
|
|---|
| 70 | powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
|
|---|
| 71 | powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
|
|---|
| 72 | rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
|
|---|
| 73 | arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
|
|---|
| 74 | s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
|
|---|
| 75 | s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
|
|---|
| 76 | x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
|
|---|
|
|---|