1*638691a0SAndroid Build Coastguard Workerdnl Process this file with autoconf to produce a configure script. 2*638691a0SAndroid Build Coastguard WorkerAC_INIT(viterbi27.c) 3*638691a0SAndroid Build Coastguard WorkerAC_CONFIG_HEADER(config.h) 4*638691a0SAndroid Build Coastguard WorkerSO_NAME=3 5*638691a0SAndroid Build Coastguard WorkerVERSION=3.0.0 6*638691a0SAndroid Build Coastguard WorkerAC_SUBST(SO_NAME) 7*638691a0SAndroid Build Coastguard WorkerAC_SUBST(VERSION) 8*638691a0SAndroid Build Coastguard Worker 9*638691a0SAndroid Build Coastguard Workerdnl Checks for programs. 10*638691a0SAndroid Build Coastguard WorkerAC_PROG_CC 11*638691a0SAndroid Build Coastguard Workerif test $GCC != "yes" 12*638691a0SAndroid Build Coastguard Workerthen 13*638691a0SAndroid Build Coastguard Worker AC_MSG_ERROR([Need GNU C compiler]) 14*638691a0SAndroid Build Coastguard Workerfi 15*638691a0SAndroid Build Coastguard Workerdnl Checks for libraries. 16*638691a0SAndroid Build Coastguard WorkerAC_CHECK_LIB(c, malloc) 17*638691a0SAndroid Build Coastguard Worker 18*638691a0SAndroid Build Coastguard Workerdnl Checks for header files. 19*638691a0SAndroid Build Coastguard WorkerAC_CHECK_HEADERS(getopt.h stdio.h stdlib.h memory.h string.h) 20*638691a0SAndroid Build Coastguard Workerif test -z "$HAVE_stdio.h" 21*638691a0SAndroid Build Coastguard Workerthen 22*638691a0SAndroid Build Coastguard Worker AC_MSG_ERROR([Need stdio.h!]) 23*638691a0SAndroid Build Coastguard Workerfi 24*638691a0SAndroid Build Coastguard Workerif test -z "$HAVE_stdlib.h" 25*638691a0SAndroid Build Coastguard Workerthen 26*638691a0SAndroid Build Coastguard Worker AC_MSG_ERROR([Need stdlib.h!]) 27*638691a0SAndroid Build Coastguard Workerfi 28*638691a0SAndroid Build Coastguard Workerif test -z "$HAVE_stdlib.h" 29*638691a0SAndroid Build Coastguard Workerthen 30*638691a0SAndroid Build Coastguard Worker AC_MSG_ERROR([Need memory.h!]) 31*638691a0SAndroid Build Coastguard Workerfi 32*638691a0SAndroid Build Coastguard Workerif test -z "$HAVE_string.h" 33*638691a0SAndroid Build Coastguard Workerthen 34*638691a0SAndroid Build Coastguard Worker AC_MSG_ERROR([Need string.h]) 35*638691a0SAndroid Build Coastguard Workerfi 36*638691a0SAndroid Build Coastguard Worker 37*638691a0SAndroid Build Coastguard WorkerAC_CANONICAL_SYSTEM 38*638691a0SAndroid Build Coastguard Workercase $target_cpu in 39*638691a0SAndroid Build Coastguard Workeri386|i486|i586|i686) 40*638691a0SAndroid Build Coastguard Worker ARCH_OPTION="-march=$target_cpu" 41*638691a0SAndroid Build Coastguard Worker MLIBS="viterbi27_mmx.o mmxbfly27.o viterbi27_sse.o ssebfly27.o viterbi27_sse2.o sse2bfly27.o \ 42*638691a0SAndroid Build Coastguard Worker viterbi29_mmx.o mmxbfly29.o viterbi29_sse.o ssebfly29.o viterbi29_sse2.o sse2bfly29.o \ 43*638691a0SAndroid Build Coastguard Worker viterbi39_sse2.o viterbi39_sse.o viterbi39_mmx.o \ 44*638691a0SAndroid Build Coastguard Worker viterbi615_mmx.o viterbi615_sse.o viterbi615_sse2.o \ 45*638691a0SAndroid Build Coastguard Worker dotprod_mmx.o dotprod_mmx_assist.o \ 46*638691a0SAndroid Build Coastguard Worker dotprod_sse2.o dotprod_sse2_assist.o \ 47*638691a0SAndroid Build Coastguard Worker peakval_mmx.o peakval_mmx_assist.o \ 48*638691a0SAndroid Build Coastguard Worker peakval_sse.o peakval_sse_assist.o \ 49*638691a0SAndroid Build Coastguard Worker peakval_sse2.o peakval_sse2_assist.o \ 50*638691a0SAndroid Build Coastguard Worker sumsq.o sumsq_port.o \ 51*638691a0SAndroid Build Coastguard Worker sumsq_sse2.o sumsq_sse2_assist.o \ 52*638691a0SAndroid Build Coastguard Worker sumsq_mmx.o sumsq_mmx_assist.o \ 53*638691a0SAndroid Build Coastguard Worker cpu_features.o cpu_mode_x86.o" 54*638691a0SAndroid Build Coastguard Worker ;; 55*638691a0SAndroid Build Coastguard Workerpowerpc*) 56*638691a0SAndroid Build Coastguard Worker ARCH_OPTION="-fno-common -faltivec" 57*638691a0SAndroid Build Coastguard Worker MLIBS="viterbi27_av.o viterbi29_av.o viterbi39_av.o viterbi615_av.o \ 58*638691a0SAndroid Build Coastguard Worker encode_rs_av.o \ 59*638691a0SAndroid Build Coastguard Worker dotprod_av.o sumsq_av.o peakval_av.o cpu_mode_ppc.o" 60*638691a0SAndroid Build Coastguard Worker ;; 61*638691a0SAndroid Build Coastguard Worker*) 62*638691a0SAndroid Build Coastguard Worker MLIBS= 63*638691a0SAndroid Build Coastguard Workeresac 64*638691a0SAndroid Build Coastguard Workercase $target_os in 65*638691a0SAndroid Build Coastguard Workerdarwin*) 66*638691a0SAndroid Build Coastguard Worker SH_LIB=libfec.dylib 67*638691a0SAndroid Build Coastguard Worker REBIND="" 68*638691a0SAndroid Build Coastguard Worker ;; 69*638691a0SAndroid Build Coastguard Worker*) 70*638691a0SAndroid Build Coastguard Worker SH_LIB=libfec.so 71*638691a0SAndroid Build Coastguard Worker REBIND=ldconfig 72*638691a0SAndroid Build Coastguard Worker ;; 73*638691a0SAndroid Build Coastguard Workeresac 74*638691a0SAndroid Build Coastguard WorkerAC_SUBST(SH_LIB) 75*638691a0SAndroid Build Coastguard WorkerAC_SUBST(REBIND) 76*638691a0SAndroid Build Coastguard WorkerAC_SUBST(MLIBS) 77*638691a0SAndroid Build Coastguard WorkerAC_SUBST(ARCH_OPTION) 78*638691a0SAndroid Build Coastguard Worker 79*638691a0SAndroid Build Coastguard Worker 80*638691a0SAndroid Build Coastguard Workerdnl Checks for library functions. 81*638691a0SAndroid Build Coastguard WorkerAC_CHECK_FUNCS(getopt_long memset memmove) 82*638691a0SAndroid Build Coastguard Worker 83*638691a0SAndroid Build Coastguard WorkerAC_OUTPUT(makefile) 84