forked from Opendigitalradio/ka9q-fec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
90 lines (84 loc) · 1.99 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
dnl Process this file with autoconf to produce a configure script.
AC_INIT(viterbi27.c)
AC_CONFIG_HEADER(config.h)
SO_NAME=3
VERSION=3.0.0
AC_SUBST(SO_NAME)
AC_SUBST(VERSION)
dnl Checks for programs.
AC_PROG_CC
if test $GCC != "yes"
then
AC_MSG_ERROR([Need GNU C compiler])
fi
dnl Checks for libraries.
AC_CHECK_LIB(c, malloc)
dnl Checks for header files.
AC_CHECK_HEADERS(getopt.h stdio.h stdlib.h memory.h string.h)
if test -z "$HAVE_stdio.h"
then
AC_MSG_ERROR([Need stdio.h!])
fi
if test -z "$HAVE_stdlib.h"
then
AC_MSG_ERROR([Need stdlib.h!])
fi
if test -z "$HAVE_stdlib.h"
then
AC_MSG_ERROR([Need memory.h!])
fi
if test -z "$HAVE_string.h"
then
AC_MSG_ERROR([Need string.h])
fi
AC_CANONICAL_SYSTEM
case $target_cpu in
x86_64)
ARCH_OPTION="-msse2"
MLIBS="dotprod_port.o \
peakval_port.o \
sumsq.o sumsq_port.o \
cpu_mode_x86_64.o"
;;
i386|i486|i586|i686)
ARCH_OPTION="-march=$target_cpu"
MLIBS="viterbi27_mmx.o mmxbfly27.o viterbi27_sse.o ssebfly27.o viterbi27_sse2.o sse2bfly27.o \
viterbi29_mmx.o mmxbfly29.o viterbi29_sse.o ssebfly29.o viterbi29_sse2.o sse2bfly29.o \
viterbi39_sse2.o viterbi39_sse.o viterbi39_mmx.o \
viterbi615_mmx.o viterbi615_sse.o viterbi615_sse2.o \
dotprod_mmx.o dotprod_mmx_assist.o \
dotprod_sse2.o dotprod_sse2_assist.o \
peakval_mmx.o peakval_mmx_assist.o \
peakval_sse.o peakval_sse_assist.o \
peakval_sse2.o peakval_sse2_assist.o \
sumsq.o sumsq_port.o \
sumsq_sse2.o sumsq_sse2_assist.o \
sumsq_mmx.o sumsq_mmx_assist.o \
cpu_features.o cpu_mode_x86.o"
;;
powerpc*)
ARCH_OPTION="-fno-common -faltivec"
MLIBS="viterbi27_av.o viterbi29_av.o viterbi39_av.o viterbi615_av.o \
encode_rs_av.o \
dotprod_av.o sumsq_av.o peakval_av.o cpu_mode_ppc.o"
;;
*)
MLIBS="cpu_mode_generic.o"
esac
case $target_os in
darwin*)
SH_LIB=libfec.dylib
REBIND=""
;;
*)
SH_LIB=libfec.so
REBIND=ldconfig
;;
esac
AC_SUBST(SH_LIB)
AC_SUBST(REBIND)
AC_SUBST(MLIBS)
AC_SUBST(ARCH_OPTION)
dnl Checks for library functions.
AC_CHECK_FUNCS(getopt_long memset memmove)
AC_OUTPUT(makefile)