2006-12-11 19:54:53 +00:00
|
|
|
# config.links - helper for ../configure -*- sh -*-
|
2004-01-12 00:51:39 +00:00
|
|
|
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
|
|
|
|
# 2004 Free Software Foundation, Inc.
|
2002-06-29 14:15:02 +00:00
|
|
|
#
|
|
|
|
# This file is part of GnuPG.
|
|
|
|
#
|
|
|
|
# GnuPG is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-10-23 10:48:09 +00:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2002-06-29 14:15:02 +00:00
|
|
|
# (at your option) any later version.
|
2012-12-13 18:15:38 +01:00
|
|
|
#
|
2002-06-29 14:15:02 +00:00
|
|
|
# GnuPG is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2012-12-13 18:15:38 +01:00
|
|
|
#
|
2002-06-29 14:15:02 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-10-23 10:48:09 +00:00
|
|
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2002-06-29 14:15:02 +00:00
|
|
|
|
|
|
|
# sourced by ../configure to get the list of files to link
|
|
|
|
# this should set $mpi_ln_list.
|
|
|
|
# Note: this is called from the above directory.
|
|
|
|
|
|
|
|
|
|
|
|
mpi_extra_modules=
|
|
|
|
mpi_sflags=
|
|
|
|
|
|
|
|
test -d ./mpi || mkdir ./mpi
|
|
|
|
|
|
|
|
echo '/* created by config.links - do not edit */' >./mpi/asm-syntax.h
|
2004-10-26 19:33:41 +00:00
|
|
|
echo "/* Host: ${host} */" >>./mpi/asm-syntax.h
|
2002-06-29 14:15:02 +00:00
|
|
|
|
|
|
|
if test "$try_asm_modules" = "yes" ; then
|
2004-10-26 19:33:41 +00:00
|
|
|
case "${host}" in
|
2004-01-12 00:51:39 +00:00
|
|
|
powerpc-apple-darwin* | \
|
|
|
|
i[34567]86*-*-openbsd[12]* | \
|
|
|
|
i[34567]86*-*-openbsd3.[0123]*)
|
|
|
|
echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
|
|
|
|
path=""
|
|
|
|
;;
|
|
|
|
i[3467]86*-*-openbsd* | \
|
2002-06-29 14:15:02 +00:00
|
|
|
i[3467]86*-*-freebsd*-elf | \
|
|
|
|
i[3467]86*-*-freebsd[3-9]* | \
|
|
|
|
i[3467]86*-*-freebsdelf* | \
|
2003-12-05 04:15:31 +00:00
|
|
|
i[3467]86*-*-netbsd* | \
|
|
|
|
i[3467]86*-*-k*bsd*)
|
2002-06-29 14:15:02 +00:00
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i386"
|
|
|
|
;;
|
2004-01-12 00:51:39 +00:00
|
|
|
i586*-*-openbsd* | \
|
|
|
|
i586*-*-freebsd*-elf | \
|
|
|
|
i586*-*-freebsd[3-9]* | \
|
|
|
|
i586*-*-freebsdelf* | \
|
|
|
|
i586*-*-netbsd* | \
|
|
|
|
i586*-*-k*bsd* | \
|
|
|
|
pentium-*-netbsd* | \
|
2002-06-29 14:15:02 +00:00
|
|
|
pentiumpro-*-netbsd*)
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i586 i386"
|
|
|
|
;;
|
|
|
|
i[34]86*-*-bsdi4*)
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i386"
|
|
|
|
;;
|
|
|
|
i[3467]86*-*-linuxaout* | \
|
|
|
|
i[3467]86*-*-linuxoldld* | \
|
|
|
|
i[3467]86*-*-*bsd*)
|
|
|
|
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i386"
|
|
|
|
;;
|
|
|
|
i586*-*-linuxaout* | \
|
|
|
|
i586*-*-linuxoldld* | \
|
|
|
|
i586*-*-*bsd*)
|
|
|
|
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i586 i386"
|
|
|
|
;;
|
|
|
|
i[3467]86*-msdosdjgpp*)
|
|
|
|
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i386"
|
|
|
|
;;
|
|
|
|
i586*-msdosdjgpp*)
|
|
|
|
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i586 i386"
|
|
|
|
;;
|
|
|
|
i[3467]86*-*-*)
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i386"
|
|
|
|
;;
|
|
|
|
i586*-*-* | \
|
|
|
|
pentium-*-* | \
|
|
|
|
pentiumpro-*-*)
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="i586 i386"
|
|
|
|
;;
|
|
|
|
alpha*-*-*)
|
|
|
|
echo '/* configured for alpha */' >>./mpi/asm-syntax.h
|
|
|
|
path="alpha"
|
|
|
|
mpi_extra_modules="udiv-qrnnd"
|
|
|
|
;;
|
|
|
|
hppa7000*-*-*)
|
|
|
|
echo '/* configured for HPPA (pa7000) */' >>./mpi/asm-syntax.h
|
|
|
|
path="hppa1.1 hppa"
|
|
|
|
mpi_extra_modules="udiv-qrnnd"
|
|
|
|
;;
|
|
|
|
hppa1.0*-*-*)
|
|
|
|
echo '/* configured for HPPA 1.0 */' >>./mpi/asm-syntax.h
|
|
|
|
path="hppa"
|
|
|
|
mpi_extra_modules="udiv-qrnnd"
|
|
|
|
;;
|
|
|
|
hppa*-*-*) # assume pa7100
|
|
|
|
echo '/* configured for HPPA (pa7100) */' >>./mpi/asm-syntax.h
|
|
|
|
path="pa7100 hppa1.1 hppa"
|
|
|
|
mpi_extra_modules="udiv-qrnnd"
|
|
|
|
;;
|
|
|
|
sparc64-*-linux-gnu)
|
2009-12-09 15:56:45 +00:00
|
|
|
echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
|
|
|
|
path=""
|
|
|
|
;;
|
2002-06-29 14:15:02 +00:00
|
|
|
sparc64-sun-solaris2*)
|
2009-12-09 15:56:45 +00:00
|
|
|
echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
|
|
|
|
path=""
|
|
|
|
;;
|
2003-11-21 01:13:55 +00:00
|
|
|
sparc64-*-netbsd* | sparc64-*-freebsd* | sparc64-*-openbsd*)
|
|
|
|
# There are no sparc64 assembler modules that work on the
|
|
|
|
# *BSDs, so use the generic C functions.
|
|
|
|
echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
|
2002-08-02 10:14:12 +00:00
|
|
|
path=""
|
|
|
|
;;
|
2009-12-09 15:56:45 +00:00
|
|
|
sparc64*-*-*)
|
|
|
|
echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
|
|
|
|
path=""
|
|
|
|
;;
|
2002-06-29 14:15:02 +00:00
|
|
|
sparc9*-*-* | \
|
|
|
|
ultrasparc*-*-* )
|
|
|
|
echo '/* configured for sparc9 or higher */' >>./mpi/asm-syntax.h
|
|
|
|
path="sparc32v8 sparc32"
|
|
|
|
;;
|
|
|
|
sparc8*-*-* | \
|
|
|
|
microsparc*-*-*)
|
|
|
|
echo '/* configured for sparc8 */' >>./mpi/asm-syntax.h
|
|
|
|
path="sparc32v8 sparc32"
|
|
|
|
;;
|
|
|
|
supersparc*-*-*)
|
|
|
|
echo '/* configured for supersparc */' >>./mpi/asm-syntax.h
|
|
|
|
path="supersparc sparc32v8 sparc32"
|
|
|
|
mpi_extra_modules="udiv"
|
|
|
|
;;
|
|
|
|
sparc*-*-*)
|
|
|
|
echo '/* configured for sparc */' >>./mpi/asm-syntax.h
|
|
|
|
path="sparc32"
|
|
|
|
mpi_extra_modules="udiv"
|
|
|
|
;;
|
|
|
|
mips[34]*-*-* | \
|
|
|
|
mips*-*-irix6*)
|
|
|
|
echo '/* configured for MIPS3 */' >>./mpi/asm-syntax.h
|
|
|
|
path="mips3"
|
|
|
|
;;
|
|
|
|
mips*-*-*)
|
|
|
|
echo '/* configured for MIPS2 */' >>./mpi/asm-syntax.h
|
|
|
|
path="mips2"
|
|
|
|
;;
|
|
|
|
|
|
|
|
# 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' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k/mc68020 m68k"
|
|
|
|
;;
|
|
|
|
m68060*-*-linuxaout*)
|
|
|
|
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k"
|
|
|
|
;;
|
|
|
|
m680[234]0*-*-linux* | \
|
|
|
|
m68k*-*-linux*)
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
;;
|
|
|
|
m68060*-*-linux*)
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k"
|
|
|
|
;;
|
2012-12-13 18:15:38 +01:00
|
|
|
m68k*-*-netbsdelf)
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k"
|
|
|
|
;;
|
2002-06-29 14:15:02 +00:00
|
|
|
m68k-atari-mint)
|
|
|
|
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k/mc68020 m68k"
|
|
|
|
;;
|
|
|
|
m68000*-*-* | \
|
|
|
|
m68060*-*-*)
|
|
|
|
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k/mc68000"
|
|
|
|
;;
|
|
|
|
m680[234]0*-*-* | \
|
|
|
|
m68k*-*-*)
|
|
|
|
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="m68k/mc68020 m68k"
|
|
|
|
;;
|
|
|
|
|
2008-03-25 10:45:59 +00:00
|
|
|
ppc620-*-* | \
|
|
|
|
powerpc64*-*-*)
|
|
|
|
mpi_sflags="-Wa,-mppc"
|
|
|
|
path="powerpc64"
|
|
|
|
;;
|
|
|
|
|
2002-06-29 14:15:02 +00:00
|
|
|
powerpc*-*-linux*)
|
|
|
|
echo '/* configured for powerpc/ELF */' >>./mpi/asm-syntax.h
|
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/powerpc32/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
path="powerpc32"
|
|
|
|
;;
|
|
|
|
|
2003-04-25 04:12:57 +00:00
|
|
|
powerpc*-*-netbsd* | powerpc*-*-openbsd*)
|
|
|
|
echo '/* configured for {Open,Net}BSD on powerpc */' >>./mpi/asm-syntax.h
|
2002-06-29 14:15:02 +00:00
|
|
|
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
|
|
|
|
cat $srcdir/mpi/powerpc32/syntax.h >>./mpi/asm-syntax.h
|
|
|
|
mpi_sflags="-Wa,-mppc"
|
|
|
|
path="powerpc32"
|
|
|
|
;;
|
|
|
|
|
|
|
|
rs6000-*-aix[456789]* | \
|
|
|
|
rs6000-*-aix3.2.[456789])
|
|
|
|
mpi_sflags="-Wa,-mpwr"
|
|
|
|
path="power"
|
|
|
|
mpi_extra_modules="udiv-w-sdiv"
|
|
|
|
;;
|
|
|
|
rs6000-*-* | \
|
|
|
|
power-*-* | \
|
|
|
|
power2-*-*)
|
|
|
|
mpi_sflags="-Wa,-mppc"
|
|
|
|
path="power"
|
|
|
|
mpi_extra_modules="udiv-w-sdiv"
|
|
|
|
;;
|
|
|
|
powerpc-ibm-aix4.2.* )
|
|
|
|
# I am not sure about this one but a machine identified by
|
|
|
|
# powerpc-ibm-aix4.2.1.0 cannot use the powerpc32 code.
|
|
|
|
mpi_sflags="-Wa,-mpwr"
|
|
|
|
path="power"
|
|
|
|
mpi_extra_modules="udiv-w-sdiv"
|
|
|
|
;;
|
|
|
|
ppc601-*-*)
|
|
|
|
mpi_sflags="-Wa,-mppc"
|
|
|
|
path="power powerpc32"
|
|
|
|
;;
|
2007-01-16 05:20:06 +00:00
|
|
|
ppc60[234]*-*-* | \
|
|
|
|
powerpc*-*-*)
|
|
|
|
mpi_sflags="-Wa,-mppc"
|
|
|
|
path="powerpc32"
|
|
|
|
;;
|
2002-06-29 14:15:02 +00:00
|
|
|
|
|
|
|
*)
|
|
|
|
echo '/* No assembler modules configured */' >>./mpi/asm-syntax.h
|
|
|
|
path=""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
echo '/* Assembler modules disabled on request */' >>./mpi/asm-syntax.h
|
|
|
|
path=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Make sysdep.h
|
|
|
|
echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
|
|
|
|
if test x$ac_cv_sys_symbol_underscore = xyes; then
|
|
|
|
cat <<EOF >>./mpi/sysdep.h
|
|
|
|
#if __STDC__
|
|
|
|
#define C_SYMBOL_NAME(name) _##name
|
|
|
|
#else
|
|
|
|
#define C_SYMBOL_NAME(name) _/**/name
|
|
|
|
#endif
|
|
|
|
EOF
|
|
|
|
else
|
|
|
|
cat <<EOF >>./mpi/sysdep.h
|
|
|
|
#define C_SYMBOL_NAME(name) name
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# fixme: grep these modules from Makefile.in
|
|
|
|
mpi_ln_modules="${mpi_extra_modules} mpih-add1 mpih-mul1 mpih-mul2 mpih-mul3 \
|
|
|
|
mpih-lshift mpih-rshift mpih-sub1"
|
|
|
|
|
|
|
|
mpi_ln_objects=
|
|
|
|
mpi_ln_list=
|
|
|
|
|
|
|
|
# try to get file to link from the assembler subdirectory and
|
|
|
|
# if this fails get it from the generic subdirectory.
|
|
|
|
path="$path generic"
|
|
|
|
for fn in $mpi_ln_modules ; do
|
|
|
|
mpi_ln_objects="$mpi_ln_objects $fn.o"
|
|
|
|
for dir in $path ; do
|
|
|
|
rm -f $srcdir/mpi/$fn.[Sc]
|
|
|
|
if test -f $srcdir/mpi/$dir/$fn.S ; then
|
|
|
|
mpi_ln_list="$mpi_ln_list mpi/$fn.S:mpi/$dir/$fn.S"
|
|
|
|
break;
|
|
|
|
elif test -f $srcdir/mpi/$dir/$fn.c ; then
|
|
|
|
mpi_ln_list="$mpi_ln_list mpi/$fn.c:mpi/$dir/$fn.c"
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
# Same thing for the file which defines the limb size
|
|
|
|
path="$path generic"
|
|
|
|
for dir in $path ; do
|
|
|
|
rm -f $srcdir/mpi/mpi-asm-defs.h
|
|
|
|
if test -f $srcdir/mpi/$dir/mpi-asm-defs.h ; then
|
|
|
|
mpi_ln_list="$mpi_ln_list mpi/mpi-asm-defs.h:mpi/$dir/mpi-asm-defs.h"
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
done
|