1
# config.links - helper for ../configure
2
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
3
# 2004 Free Software Foundation, Inc.
5
# This file is part of GnuPG.
7
# GnuPG is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 2 of the License, or
10
# (at your option) any later version.
12
# GnuPG is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21
# sourced by ../configure to get the list of files to link
22
# this should set $mpi_ln_list.
23
# Note: this is called from the above directory.
29
test -d ./mpi || mkdir ./mpi
31
echo '/* created by config.links - do not edit */' >./mpi/asm-syntax.h
32
echo "/* Host: ${host} */" >>./mpi/asm-syntax.h
34
if test "$try_asm_modules" = "yes" ; then
36
powerpc-apple-darwin* | \
37
i[34567]86*-*-openbsd[12]* | \
38
i[34567]86*-*-openbsd3.[0123]*)
39
echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
42
i[3467]86*-*-openbsd* | \
43
i[3467]86*-*-freebsd*-elf | \
44
i[3467]86*-*-freebsd[3-9]* | \
45
i[3467]86*-*-freebsdelf* | \
46
i[3467]86*-*-netbsd* | \
48
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
49
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
53
i586*-*-freebsd*-elf | \
54
i586*-*-freebsd[3-9]* | \
55
i586*-*-freebsdelf* | \
60
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
61
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
65
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
66
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
69
i[3467]86*-*-linuxaout* | \
70
i[3467]86*-*-linuxoldld* | \
72
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
73
echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h
74
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
77
i586*-*-linuxaout* | \
78
i586*-*-linuxoldld* | \
80
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
81
echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h
82
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
85
i[3467]86*-msdosdjgpp*)
86
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
87
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
91
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
92
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
96
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
97
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
103
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
104
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
108
echo '/* configured for alpha */' >>./mpi/asm-syntax.h
110
mpi_extra_modules="udiv-qrnnd"
113
echo '/* configured for HPPA (pa7000) */' >>./mpi/asm-syntax.h
115
mpi_extra_modules="udiv-qrnnd"
118
echo '/* configured for HPPA 1.0 */' >>./mpi/asm-syntax.h
120
mpi_extra_modules="udiv-qrnnd"
122
hppa*-*-*) # assume pa7100
123
echo '/* configured for HPPA (pa7100) */' >>./mpi/asm-syntax.h
124
path="pa7100 hppa1.1 hppa"
125
mpi_extra_modules="udiv-qrnnd"
128
# An extra rule because we have an report for this one only.
129
# Should be compared against the next GMP version
130
echo '/* configured for sparc64-*-linux-gnu */' >>./mpi/asm-syntax.h
131
path="sparc32v8 sparc32"
132
mpi_extra_modules="udiv"
134
sparc64-sun-solaris2*)
135
# Got a report that udiv is missing, so we try this one
136
echo '/* configured for sparc64-sun-solaris2 */' >>./mpi/asm-syntax.h
137
path="sparc32v8 sparc32"
138
mpi_extra_modules="udiv"
140
sparc64-*-netbsd* | sparc64-*-freebsd* | sparc64-*-openbsd*)
141
# There are no sparc64 assembler modules that work on the
142
# *BSDs, so use the generic C functions.
143
echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
149
echo '/* configured for sparc9 or higher */' >>./mpi/asm-syntax.h
150
path="sparc32v8 sparc32"
154
echo '/* configured for sparc8 */' >>./mpi/asm-syntax.h
155
path="sparc32v8 sparc32"
158
echo '/* configured for supersparc */' >>./mpi/asm-syntax.h
159
path="supersparc sparc32v8 sparc32"
160
mpi_extra_modules="udiv"
163
echo '/* configured for sparc */' >>./mpi/asm-syntax.h
165
mpi_extra_modules="udiv"
169
echo '/* configured for MIPS3 */' >>./mpi/asm-syntax.h
173
echo '/* configured for MIPS2 */' >>./mpi/asm-syntax.h
177
# Motorola 68k configurations. Let m68k mean 68020-68040.
178
# mc68000 or mc68060 configurations need to be specified explicitly
179
m680[234]0*-*-linuxaout* | \
181
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
182
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
183
path="m68k/mc68020 m68k"
185
m68060*-*-linuxaout*)
186
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
187
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
190
m680[234]0*-*-linux* | \
192
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
193
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
196
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
197
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
201
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
202
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
203
path="m68k/mc68020 m68k"
207
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
208
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
213
echo '#define MIT_SYNTAX' >>./mpi/asm-syntax.h
214
cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
215
path="m68k/mc68020 m68k"
219
echo '/* configured for powerpc/ELF */' >>./mpi/asm-syntax.h
220
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
221
cat $srcdir/mpi/powerpc32/syntax.h >>./mpi/asm-syntax.h
225
powerpc*-*-netbsd* | powerpc*-*-openbsd*)
226
echo '/* configured for {Open,Net}BSD on powerpc */' >>./mpi/asm-syntax.h
227
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
228
cat $srcdir/mpi/powerpc32/syntax.h >>./mpi/asm-syntax.h
229
mpi_sflags="-Wa,-mppc"
233
rs6000-*-aix[456789]* | \
234
rs6000-*-aix3.2.[456789])
235
mpi_sflags="-Wa,-mpwr"
237
mpi_extra_modules="udiv-w-sdiv"
242
mpi_sflags="-Wa,-mppc"
244
mpi_extra_modules="udiv-w-sdiv"
246
powerpc-ibm-aix4.2.* )
247
# I am not sure about this one but a machine identified by
248
# powerpc-ibm-aix4.2.1.0 cannot use the powerpc32 code.
249
mpi_sflags="-Wa,-mpwr"
251
mpi_extra_modules="udiv-w-sdiv"
254
mpi_sflags="-Wa,-mppc"
255
path="power powerpc32"
259
mpi_sflags="-Wa,-mppc"
264
mpi_sflags="-Wa,-mppc"
269
echo '/* No assembler modules configured */' >>./mpi/asm-syntax.h
274
echo '/* Assembler modules disabled on request */' >>./mpi/asm-syntax.h
280
echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
281
if test x$ac_cv_sys_symbol_underscore = xyes; then
282
cat <<EOF >>./mpi/sysdep.h
284
#define C_SYMBOL_NAME(name) _##name
286
#define C_SYMBOL_NAME(name) _/**/name
290
cat <<EOF >>./mpi/sysdep.h
291
#define C_SYMBOL_NAME(name) name
296
# fixme: grep these modules from Makefile.in
297
mpi_ln_modules="${mpi_extra_modules} mpih-add1 mpih-mul1 mpih-mul2 mpih-mul3 \
298
mpih-lshift mpih-rshift mpih-sub1"
303
# try to get file to link from the assembler subdirectory and
304
# if this fails get it from the generic subdirectory.
306
for fn in $mpi_ln_modules ; do
307
mpi_ln_objects="$mpi_ln_objects $fn.o"
308
for dir in $path ; do
309
rm -f $srcdir/mpi/$fn.[Sc]
310
if test -f $srcdir/mpi/$dir/$fn.S ; then
311
mpi_ln_list="$mpi_ln_list mpi/$fn.S:mpi/$dir/$fn.S"
313
elif test -f $srcdir/mpi/$dir/$fn.c ; then
314
mpi_ln_list="$mpi_ln_list mpi/$fn.c:mpi/$dir/$fn.c"
320
# Same thing for the file which defines the limb size
322
for dir in $path ; do
323
rm -f $srcdir/mpi/mpi-asm-defs.h
324
if test -f $srcdir/mpi/$dir/mpi-asm-defs.h ; then
325
mpi_ln_list="$mpi_ln_list mpi/mpi-asm-defs.h:mpi/$dir/mpi-asm-defs.h"