File fec-3.0.1-pcharest.64bit.patch of Package fec

--- fec-3.0.1.orig/makefile.in
+++ fec-3.0.1/makefile.in
@@ -8,6 +8,10 @@
 exec_prefix=@exec_prefix@
 VPATH = @srcdir@
 CC=@CC@
+AR=@AR@
+RANLIB=@RANLIB@
+DLLTOOL=@DLLTOOL@
+RUN_ENV=@RUN_ENV@
 LIBS=@MLIBS@ fec.o sim.o viterbi27.o viterbi27_port.o viterbi29.o viterbi29_port.o \
 	viterbi39.o viterbi39_port.o \
 	viterbi615.o viterbi615_port.o encode_rs_char.o encode_rs_int.o encode_rs_8.o \
@@ -18,9 +22,10 @@
 	peakval.o peakval_port.o \
 	sumsq.o sumsq_port.o
 
-CFLAGS=@CFLAGS@ -I. -Wall @ARCH_OPTION@
+CFLAGS=@CFLAGS@ -I. -Wall @ARCH_OPTION@ -fPIC
 
-SHARED_LIB=@SH_LIB@
+SHARED_LIB=@SH_LIB@.@VERSION@
+SO_NAME=@SH_LIB@.@SO_NAME@
 
 all: libfec.a $(SHARED_LIB)
 
@@ -43,64 +48,69 @@
 install: all
 	mkdir -p @libdir@ 
 	install -m 644 -p $(SHARED_LIB) libfec.a @libdir@
-#	(cd @libdir@;ln -f -s $(SHARED_LIB) libfec.so)
-	@REBIND@
+	(cd @libdir@;ln -f -s $(SHARED_LIB) libfec.so)
+	### not for RPM, RPM does not build as (fake)-root: user@REBIND@ -n @libdir@
 	mkdir -p @includedir@
 	install -m 644 -p fec.h @includedir@
 	mkdir -m 0755 -p @mandir@/man3
 	install -m 644 -p simd-viterbi.3 rs.3 dsp.3 @mandir@/man3
+	mkdir -m 0755 -p @libdir@/pkgconfig
+	install -m 644 -p fec@SO_NAME@.pc @libdir@/pkgconfig
 
 peaktest: peaktest.o libfec.a
-	gcc -g -o $@ $^
+	$(CC) $(CFLAGS) -g -o $@ $^
 
 sumsq_test: sumsq_test.o libfec.a
-	gcc -g -o $@ $^
+	$(CC) $(CFLAGS) -g -o $@ $^
 
 dtest: dtest.o libfec.a
-	gcc -g -o $@ $^ -lm
+	$(CC) $(CFLAGS) -g -o $@ $^ -lm
 
 vtest27: vtest27.o libfec.a
-	gcc -g -o $@ $^ -lm
+	$(CC) $(CFLAGS) -g -o $@ $^ -lm
 
 vtest29: vtest29.o libfec.a
-	gcc -g -o $@ $^ -lm
+	$(CC) $(CFLAGS) -g -o $@ $^ -lm
 
 vtest39: vtest39.o libfec.a
-	gcc -g -o $@ $^ -lm
+	$(CC) $(CFLAGS) -g -o $@ $^ -lm
 
 vtest615: vtest615.o libfec.a
-	gcc -g -o $@ $^ -lm
+	$(CC) $(CFLAGS) -g -o $@ $^ -lm
 
 rstest: rstest.o libfec.a
-	gcc -g -o $@ $^
+	$(CC) $(CFLAGS) -g -o $@ $^
 
 rs_speedtest: rs_speedtest.o libfec.a
-	gcc -g -o $@ $^	
+	$(CC) $(CFLAGS) -g -o $@ $^	
 
 # for some reason, the test programs without args segfault on the PPC with -O2 optimization. Dunno why - compiler bug?
 vtest27.o: vtest27.c fec.h
-	gcc -g -c $<
+	$(CC) $(CFLAGS) -g -c $<
 
 vtest29.o: vtest29.c fec.h
-	gcc -g -c $<
+	$(CC) $(CFLAGS) -g -c $<
 
 vtest39.o: vtest39.c fec.h
-	gcc -g -c $<
+	$(CC) $(CFLAGS) -g -c $<
 
 vtest615.o: vtest615.c fec.h
-	gcc -g -c $<
+	$(CC) $(CFLAGS) -g -c $<
 
 libfec.a: $(LIBS)
-	ar rv $@ $^
-	ranlib libfec.a
+	$(AR) rv $@ $^
+	$(RANLIB) libfec.a
 
 # for Darwin
 libfec.dylib: $(LIBS)
 	$(CC) -dynamiclib -install_name $@ -o $@ $^
 
 # for Linux et al
-libfec.so: $(LIBS)
-	gcc -shared -Xlinker -soname=$@ -o $@ -Wl,-whole-archive $^ -Wl,-no-whole-archive -lc
+$(SHARED_LIB): $(LIBS)
+	$(CC) -shared -Xlinker -soname=$(SO_NAME) -o $@ -Wl,-whole-archive $^ -Wl,-no-whole-archive -lc -lm
+
+libfec.dll: $(LIBS)
+	$(DLLTOOL) -e $@ $^
 
 dotprod.o: dotprod.c fec.h
 
@@ -143,30 +153,30 @@
 ccsds_tab.o: ccsds_tab.c
 
 ccsds_tab.c: gen_ccsds
-	./gen_ccsds > ccsds_tab.c
+	$(RUN_ENV) ./gen_ccsds > ccsds_tab.c
 
 gen_ccsds: gen_ccsds.o init_rs_char.o
-	gcc -o $@ $^
+	$(CC) $(CFLAGS) -o $@ $^
 
 gen_ccsds.o: gen_ccsds.c
-	gcc  $(CFLAGS) -c -o $@ $<
+	$(CC)  $(CFLAGS) -c -o $@ $<
 
 ccsds_tal.o: ccsds_tal.c
 
 ccsds_tal.c: gen_ccsds_tal
-	./gen_ccsds_tal > ccsds_tal.c
+	$(RUN_ENV) ./gen_ccsds_tal > ccsds_tal.c
 
 exercise_char.o: exercise.c
-	gcc $(CFLAGS) -c -o $@ $<
+	$(CC) $(CFLAGS) -c -o $@ $<
 
 exercise_int.o: exercise.c
-	gcc -DBIGSYM=1 $(CFLAGS) -c -o $@ $<
+	$(CC) -DBIGSYM=1 $(CFLAGS) -c -o $@ $<
 
 exercise_8.o: exercise.c
-	gcc -DFIXED=1 $(CFLAGS) -c -o $@ $<
+	$(CC) -DFIXED=1 $(CFLAGS) -c -o $@ $<
 
 exercise_ccsds.o: exercise.c
-	gcc -DCCSDS=1 $(CFLAGS) -c -o $@ $<
+	$(CC) -DCCSDS=1 $(CFLAGS) -c -o $@ $<
 
 viterbi27.o: viterbi27.c fec.h
 
@@ -175,13 +185,13 @@
 viterbi27_av.o: viterbi27_av.c fec.h
 
 viterbi27_mmx.o: viterbi27_mmx.c fec.h
-	gcc $(CFLAGS) -mmmx -c -o $@ $<
+	$(CC) $(CFLAGS) -mmmx -c -o $@ $<
 
 viterbi27_sse.o: viterbi27_sse.c fec.h
-	gcc $(CFLAGS) -msse -c -o $@ $<
+	$(CC) $(CFLAGS) -msse -c -o $@ $<
 
 viterbi27_sse2.o: viterbi27_sse2.c fec.h
-	gcc $(CFLAGS) -msse2 -c -o $@ $<
+	$(CC) $(CFLAGS) -msse2 -c -o $@ $<
 
 viterbi29.o: viterbi29.c fec.h
 
@@ -190,13 +200,13 @@
 viterbi29_av.o: viterbi29_av.c fec.h
 
 viterbi29_mmx.o: viterbi29_mmx.c fec.h
-	gcc $(CFLAGS) -mmmx -c -o $@ $<
+	$(CC) $(CFLAGS) -mmmx -c -o $@ $<
 
 viterbi29_sse.o: viterbi29_sse.c fec.h
-	gcc $(CFLAGS) -msse -c -o $@ $<
+	$(CC) $(CFLAGS) -msse -c -o $@ $<
 
 viterbi29_sse2.o: viterbi29_sse2.c fec.h
-	gcc $(CFLAGS) -msse2 -c -o $@ $<
+	$(CC) $(CFLAGS) -msse2 -c -o $@ $<
 
 viterbi39.o: viterbi39.c fec.h
 
@@ -205,13 +215,13 @@
 viterbi39_av.o: viterbi39_av.c fec.h
 
 viterbi39_mmx.o: viterbi39_mmx.c fec.h
-	gcc $(CFLAGS) -mmmx -c -o $@ $<
+	$(CC) $(CFLAGS) -mmmx -c -o $@ $<
 
 viterbi39_sse.o: viterbi39_sse.c fec.h
-	gcc $(CFLAGS) -msse -c -o $@ $<
+	$(CC) $(CFLAGS) -msse -c -o $@ $<
 
 viterbi39_sse2.o: viterbi39_sse2.c fec.h
-	gcc $(CFLAGS) -msse2 -c -o $@ $<
+	$(CC) $(CFLAGS) -msse2 -c -o $@ $<
 
 viterbi615.o: viterbi615.c fec.h
 
@@ -220,23 +230,26 @@
 viterbi615_av.o: viterbi615_av.c fec.h
 
 viterbi615_mmx.o: viterbi615_mmx.c fec.h
-	gcc $(CFLAGS) -mmmx -c -o $@ $<
+	$(CC) $(CFLAGS) -mmmx -c -o $@ $<
 
 viterbi615_sse.o: viterbi615_sse.c fec.h
-	gcc $(CFLAGS) -msse -c -o $@ $<
+	$(CC) $(CFLAGS) -msse -c -o $@ $<
 
 viterbi615_sse2.o: viterbi615_sse2.c fec.h
-	gcc $(CFLAGS) -msse2 -c -o $@ $<
+	$(CC) $(CFLAGS) -msse2 -c -o $@ $<
 
 cpu_mode_x86.o: cpu_mode_x86.c fec.h
 
 cpu_mode_ppc.o: cpu_mode_ppc.c fec.h
 
+%.o:	%.s
+	$(AS) --32 $< -o $@
+
 
 clean:
 	rm -f *.o $(SHARED_LIB) *.a rs_speedtest peaktest sumsq_test dtest vtest27 vtest29 vtest39 vtest615 rstest ccsds_tab.c ccsds_tal.c gen_ccsds gen_ccsds_tal core
 	rm -rf autom4te.cache
 
 distclean: clean
-	rm -f config.log config.cache config.status config.h makefile
+	rm -f config.log config.cache config.status config.h makefile fec@SO_NAME@.pc
 
--- fec-3.0.1.orig/config.log
+++ fec-3.0.1/config.log
@@ -0,0 +1,309 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by configure, which was
+generated by GNU Autoconf 2.65.  Invocation command line was
+
+  $ ./configure --build i486-linux-gnu --prefix=/usr --mandir=${prefix}/share/man --infodir=${prefix}/share/info CFLAGS=-g -O2 LDFLAGS=-Wl,-z,defs
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = demo-desktop
+uname -m = i686
+uname -r = 2.6.32-24-generic
+uname -s = Linux
+uname -v = #39-Ubuntu SMP Wed Jul 28 06:07:29 UTC 2010
+
+/usr/bin/uname -p = unknown
+/bin/uname -X     = unknown
+
+/bin/arch              = unknown
+/usr/bin/arch -k       = unknown
+/usr/convex/getsysinfo = unknown
+/usr/bin/hostinfo      = unknown
+/bin/machine           = unknown
+/usr/bin/oslevel       = unknown
+/bin/universe          = unknown
+
+PATH: /usr/sbin
+PATH: /usr/bin
+PATH: /sbin
+PATH: /bin
+PATH: /usr/bin/X11
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:2133: checking for gcc
+configure:2149: found /usr/bin/gcc
+configure:2160: result: gcc
+configure:2389: checking for C compiler version
+configure:2398: gcc --version >&5
+gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
+Copyright (C) 2009 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+configure:2409: $? = 0
+configure:2398: gcc -v >&5
+Using built-in specs.
+Target: i486-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
+Thread model: posix
+gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) 
+configure:2409: $? = 0
+configure:2398: gcc -V >&5
+gcc: '-V' option must have argument
+configure:2409: $? = 1
+configure:2398: gcc -qversion >&5
+gcc: unrecognized option '-qversion'
+gcc: no input files
+configure:2409: $? = 1
+configure:2429: checking whether the C compiler works
+configure:2451: gcc -g -O2  -Wl,-z,defs conftest.c  >&5
+configure:2455: $? = 0
+configure:2504: result: yes
+configure:2507: checking for C compiler default output file name
+configure:2509: result: a.out
+configure:2515: checking for suffix of executables
+configure:2522: gcc -o conftest -g -O2  -Wl,-z,defs conftest.c  >&5
+configure:2526: $? = 0
+configure:2548: result: 
+configure:2570: checking whether we are cross compiling
+configure:2578: gcc -o conftest -g -O2  -Wl,-z,defs conftest.c  >&5
+configure:2582: $? = 0
+configure:2589: ./conftest
+configure:2593: $? = 0
+configure:2608: result: no
+configure:2613: checking for suffix of object files
+configure:2635: gcc -c -g -O2  conftest.c >&5
+configure:2639: $? = 0
+configure:2660: result: o
+configure:2664: checking whether we are using the GNU C compiler
+configure:2683: gcc -c -g -O2  conftest.c >&5
+configure:2683: $? = 0
+configure:2692: result: yes
+configure:2701: checking whether gcc accepts -g
+configure:2721: gcc -c -g  conftest.c >&5
+configure:2721: $? = 0
+configure:2762: result: yes
+configure:2779: checking for gcc option to accept ISO C89
+configure:2843: gcc  -c -g -O2  conftest.c >&5
+configure:2843: $? = 0
+configure:2856: result: none needed
+configure:2919: checking for ar
+configure:2935: found /usr/bin/ar
+configure:2946: result: ar
+configure:3011: checking for as
+configure:3027: found /usr/bin/as
+configure:3038: result: as
+configure:3103: checking for ranlib
+configure:3119: found /usr/bin/ranlib
+configure:3130: result: ranlib
+configure:3195: checking for dlltool
+configure:3225: result: no
+configure:3253: checking for malloc in -lc
+configure:3278: gcc -o conftest -g -O2  -Wl,-z,defs conftest.c -lc   >&5
+conftest.c:16: warning: conflicting types for built-in function 'malloc'
+configure:3278: $? = 0
+configure:3287: result: yes
+configure:3304: checking how to run the C preprocessor
+configure:3335: gcc -E  conftest.c
+configure:3335: $? = 0
+configure:3349: gcc -E  conftest.c
+conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
+configure:3349: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define HAVE_LIBC 1
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:3374: result: gcc -E
+configure:3394: gcc -E  conftest.c
+configure:3394: $? = 0
+configure:3408: gcc -E  conftest.c
+conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
+configure:3408: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define HAVE_LIBC 1
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:3437: checking for grep that handles long lines and -e
+configure:3495: result: /bin/grep
+configure:3500: checking for egrep
+configure:3562: result: /bin/grep -E
+configure:3567: checking for ANSI C header files
+configure:3587: gcc -c -g -O2  conftest.c >&5
+configure:3587: $? = 0
+configure:3660: gcc -o conftest -g -O2  -Wl,-z,defs conftest.c -lc  >&5
+configure:3660: $? = 0
+configure:3660: ./conftest
+configure:3660: $? = 0
+configure:3671: result: yes
+configure:3684: checking for sys/types.h
+configure:3684: gcc -c -g -O2  conftest.c >&5
+configure:3684: $? = 0
+configure:3684: result: yes
+configure:3684: checking for sys/stat.h
+configure:3684: gcc -c -g -O2  conftest.c >&5
+configure:3684: $? = 0
+configure:3684: result: yes
+configure:3684: checking for stdlib.h
+configure:3684: gcc -c -g -O2  conftest.c >&5
+configure:3684: $? = 0
+configure:3684: result: yes
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_c_compiler_gnu=yes
+ac_cv_env_CC_set=
+ac_cv_env_CC_value=
+ac_cv_env_CFLAGS_set=set
+ac_cv_env_CFLAGS_value='-g -O2'
+ac_cv_env_CPPFLAGS_set=set
+ac_cv_env_CPPFLAGS_value=
+ac_cv_env_CPP_set=
+ac_cv_env_CPP_value=
+ac_cv_env_LDFLAGS_set=set
+ac_cv_env_LDFLAGS_value=-Wl,-z,defs
+ac_cv_env_LIBS_set=
+ac_cv_env_LIBS_value=
+ac_cv_env_build_alias_set=set
+ac_cv_env_build_alias_value=i486-linux-gnu
+ac_cv_env_host_alias_set=
+ac_cv_env_host_alias_value=
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_header_stdc=yes
+ac_cv_header_stdlib_h=yes
+ac_cv_header_sys_stat_h=yes
+ac_cv_header_sys_types_h=yes
+ac_cv_lib_c_malloc=yes
+ac_cv_objext=o
+ac_cv_path_EGREP='/bin/grep -E'
+ac_cv_path_GREP=/bin/grep
+ac_cv_prog_CPP='gcc -E'
+ac_cv_prog_ac_ct_AR=ar
+ac_cv_prog_ac_ct_AS=as
+ac_cv_prog_ac_ct_CC=gcc
+ac_cv_prog_ac_ct_RANLIB=ranlib
+ac_cv_prog_cc_c89=
+ac_cv_prog_cc_g=yes
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+AR='ar'
+ARCH_OPTION=''
+AS='as'
+CC='gcc'
+CFLAGS='-g -O2'
+CPP='gcc -E'
+CPPFLAGS=''
+DEFS=''
+DLLTOOL=':'
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+EGREP='/bin/grep -E'
+EXEEXT=''
+GREP='/bin/grep'
+LDFLAGS='-Wl,-z,defs'
+LIBOBJS=''
+LIBS='-lc '
+LTLIBOBJS=''
+MLIBS=''
+OBJEXT='o'
+PACKAGE_BUGREPORT=''
+PACKAGE_NAME=''
+PACKAGE_STRING=''
+PACKAGE_TARNAME=''
+PACKAGE_URL=''
+PACKAGE_VERSION=''
+PATH_SEPARATOR=':'
+RANLIB='ranlib'
+REBIND=''
+RUN_ENV=''
+SHELL='/bin/bash'
+SH_LIB=''
+SO_NAME='3'
+VERSION='3.0.1'
+WINE=''
+ac_ct_CC='gcc'
+bindir='${exec_prefix}/bin'
+build='i486-linux-gnu'
+build_alias='i486-linux-gnu'
+build_cpu=''
+build_os=''
+build_vendor=''
+datadir='${datarootdir}'
+datarootdir='${prefix}/share'
+docdir='${datarootdir}/doc/${PACKAGE}'
+dvidir='${docdir}'
+exec_prefix='NONE'
+host=''
+host_alias=''
+host_cpu=''
+host_os=''
+host_vendor=''
+htmldir='${docdir}'
+includedir='${prefix}/include'
+infodir='${prefix}/share/info'
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+localedir='${datarootdir}/locale'
+localstatedir='${prefix}/var'
+mandir='${prefix}/share/man'
+oldincludedir='/usr/include'
+pdfdir='${docdir}'
+prefix='/usr'
+program_transform_name='s,x,x,'
+psdir='${docdir}'
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+sysconfdir='${prefix}/etc'
+target=''
+target_alias=''
+target_cpu=''
+target_os=''
+target_vendor=''
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+/* confdefs.h */
+#define PACKAGE_NAME ""
+#define PACKAGE_TARNAME ""
+#define PACKAGE_VERSION ""
+#define PACKAGE_STRING ""
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_URL ""
+#define HAVE_LIBC 1
+#define STDC_HEADERS 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_STDLIB_H 1
+
+configure: caught signal 2
+configure: exit 1
--- fec-3.0.1.orig/dotprod.c
+++ fec-3.0.1/dotprod.c
@@ -54,6 +54,7 @@
   switch(Cpu_mode){
   case PORT:
   default:
+    return freedp_port(p);
 #ifdef __i386__
   case MMX:
   case SSE:
--- fec-3.0.1.orig/config.h.in
+++ fec-3.0.1/config.h.in
@@ -1,19 +1,67 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+/* config.h.in.  Generated from configure.in by autoheader.  */
 
-/* Define if you have the getopt_long function.  */
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long' function. */
 #undef HAVE_GETOPT_LONG
 
-/* Define if you have the <getopt.h> header file.  */
-#undef HAVE_GETOPT_H
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `c' library (-lc). */
+#undef HAVE_LIBC
 
-/* Define if you have the <memory.h> header file.  */
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
-/* Define if you have the <stdio.h> header file.  */
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
 #undef HAVE_STDIO_H
 
-/* Define if you have the <stdlib.h> header file.  */
+/* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define if you have the c library (-lc).  */
-#undef HAVE_LIBC
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
--- fec-3.0.1.orig/fec.h
+++ fec-3.0.1/fec.h
@@ -264,7 +264,7 @@
 /* Determine parity of argument: 1 = odd, 0 = even */
 #ifdef __i386__
 static inline int parityb(unsigned char x){
-  __asm__ __volatile__ ("test %1,%1;setpo %0" : "=g"(x) : "r" (x));
+  __asm__ __volatile__ ("test %1,%1;setpo %0" : "=q"(x) : "q" (x));
   return x;
 }
 #else
--- fec-3.0.1.orig/fec3.pc.in
+++ fec-3.0.1/fec3.pc.in
@@ -0,0 +1,15 @@
+# libfec pkg-config source file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: fec
+Description: Provides several forward error correction (FEC)
+Version: @VERSION@
+Requires:
+Conflicts:
+Libs: -L${libdir} -lfec
+Cflags: -I${includedir}
+~
--- fec-3.0.1.orig/configure.in
+++ fec-3.0.1/configure.in
@@ -2,12 +2,20 @@
 AC_INIT(viterbi27.c)
 AC_CONFIG_HEADER(config.h)
 SO_NAME=3
-VERSION=3.0.0
+VERSION=3.0.1
 AC_SUBST(SO_NAME)
 AC_SUBST(VERSION)
 
 dnl Checks for programs.
 AC_PROG_CC
+AC_CHECK_TOOL([AR], [ar], [:])
+AC_CHECK_TOOL([AS], [as], [:])
+AC_CHECK_TOOL([RANLIB], [ranlib], [:])
+AC_CHECK_TOOL([DLLTOOL], [dlltool], [:])
+AC_SUBST([AR])
+AC_SUBST([AS])
+AC_SUBST([RANLIB])
+AC_SUBST([DLLTOOL])
 if test $GCC != "yes"
 then
 	AC_MSG_ERROR([Need GNU C compiler])
@@ -59,25 +67,37 @@
 	dotprod_av.o sumsq_av.o peakval_av.o cpu_mode_ppc.o"
 	;;
 *)
-	MLIBS=
+	MLIBS="cpu_mode_ppc.o"
 esac
 case $target_os in
 darwin*)
 	SH_LIB=libfec.dylib
 	REBIND=""
+    RUN_ENV=""
+	;;
+mingw32*)
+	SH_LIB=libfec.dll
+	REBIND=""
+    AC_CHECK_PROG([WINE],[wine],[yes], [no])
+    AS_IF([test "X$WINE" = "xno"],
+            [AC_MSG_ERROR([In the building procces, code generating software is compiled. Wine is required to run the Win32 cross-compiled software.])])
+    RUN_ENV=wine
 	;;
 *)
 	SH_LIB=libfec.so
 	REBIND=ldconfig
+    RUN_ENV=""
 	;;
 esac
 AC_SUBST(SH_LIB)
 AC_SUBST(REBIND)
 AC_SUBST(MLIBS)
 AC_SUBST(ARCH_OPTION)
+AC_SUBST(RUN_ENV)
 
 
 dnl Checks for library functions.
 AC_CHECK_FUNCS(getopt_long memset memmove)
 
+AC_CONFIG_FILES([fec3.pc])
 AC_OUTPUT(makefile)
--- fec-3.0.1.orig/debian/libfec3.dirs
+++ fec-3.0.1/debian/libfec3.dirs
@@ -0,0 +1 @@
+usr/lib
--- fec-3.0.1.orig/debian/copyright
+++ fec-3.0.1/debian/copyright
@@ -0,0 +1,21 @@
+This work was packaged for Debian by:
+
+    Pascal Charest <pascal.charest@crc.ca> on Wed, 09 Dec 2009 23:51:48 -0500.
+
+It was downloaded from:
+
+    http://www.ka9q.net/code/fec/
+
+Upstream Author:
+
+    Phil Karn, KA9Q
+
+    Copyright (C) 2006 by Phil Karn, KA9Q
+
+    It may be used under the terms of the GNU Lesser General Public License
+    (LGPL). See the file "lesser.txt" in this package for license details.
+
+The Debian packaging is:
+
+    Copyright 2009, 2010, Pascal Charest <pascal.charest@crc.ca> and
+    is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'.
--- fec-3.0.1.orig/debian/libfec3.postinst
+++ fec-3.0.1/debian/libfec3.postinst
@@ -0,0 +1,40 @@
+#!/bin/sh
+# postinst script for fec
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+    ldconfig
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- fec-3.0.1.orig/debian/rules
+++ fec-3.0.1/debian/rules
@@ -0,0 +1,116 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+else
+CROSS= --build $(DEB_BUILD_GNU_TYPE)
+endif
+
+
+configure:	configure.in
+	autoreconf
+
+
+# shared library versions, option 1
+version=2.0.5
+major=2
+# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
+#version=`ls src/.libs/lib*.so.* | \
+# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
+#major=`ls src/.libs/lib*.so.* | \
+# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
+
+config.status: configure
+	dh_testdir
+	# Add here commands to configure the package.
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+	cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+	cp -f /usr/share/misc/config.guess config.guess
+endif
+	./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+
+
+build: build-stamp
+build-stamp:  config.status 
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE)
+
+	touch $@
+
+clean: 
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp 
+
+	# Add here commands to clean up after the build process.
+	[ ! -f makefile ] || $(MAKE) distclean
+	[ ! -f configure ] || rm configure
+	rm -f config.sub config.guess
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp
+	$(MAKE) prefix=$(CURDIR)/debian/tmp/usr install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installexamples
+	dh_install
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- fec-3.0.1.orig/debian/libfec3-dev.dirs
+++ fec-3.0.1/debian/libfec3-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
--- fec-3.0.1.orig/debian/docs
+++ fec-3.0.1/debian/docs
@@ -0,0 +1,2 @@
+lesser.txt
+README
--- fec-3.0.1.orig/debian/changelog
+++ fec-3.0.1/debian/changelog
@@ -0,0 +1,14 @@
+fec (3.0.1-2) unstable; urgency=low
+
+  * Fix compilation bug for Ubuntu 10.04
+  * Fix compilation bug 64 bits system
+
+ -- Pascal Charest <pascal.charest@crc.ca>  Tue, 26 Oct 2010 14:26:08 -0500
+
+fec (3.0.1-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Pascal Charest <pascal.charest@crc.ca>  Wed, 09 Dec 2009 23:51:48 -0500
+
+
--- fec-3.0.1.orig/debian/libfec3.shlibs
+++ fec-3.0.1/debian/libfec3.shlibs
@@ -0,0 +1 @@
+libfec 3 libfec3 (>=3.0.1)
--- fec-3.0.1.orig/debian/compat
+++ fec-3.0.1/debian/compat
@@ -0,0 +1 @@
+7
--- fec-3.0.1.orig/debian/control
+++ fec-3.0.1/debian/control
@@ -0,0 +1,31 @@
+Source: fec
+Priority: extra
+Maintainer: Pascal Charest <pascal.charest@crc.ca>
+Build-Depends: debhelper (>= 7), autotools-dev, autoconf, automake, libtool
+Standards-Version: 3.8.0
+Section: libs
+Homepage: http://www.ka9q.net/code/fec/
+
+Package: libfec3-dev
+Section: libdevel
+Architecture: any
+Depends: libfec3 (= ${binary:Version})
+Description: Forward error correction (FEC) - devel files
+ This library package provides several forward error correction (FEC)
+ decoders and accelerated primitives useful in digital signal
+ processing (DSP). Except for the Reed-Solomon codecs, these functions
+ take full advantage of the MMX, SSE and SSE2 SIMD instruction sets on
+ Intel/AMD IA-32 processors and the Altivec/VMX/Velocity Engine SIMD
+ instruction set on the G4 and G5 PowerPC. 
+
+Package: libfec3
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Forward error correction (FEC) - library files
+ This library package provides several forward error correction (FEC)
+ decoders and accelerated primitives useful in digital signal
+ processing (DSP). Except for the Reed-Solomon codecs, these functions
+ take full advantage of the MMX, SSE and SSE2 SIMD instruction sets on
+ Intel/AMD IA-32 processors and the Altivec/VMX/Velocity Engine SIMD
+ instruction set on the G4 and G5 PowerPC. 
--- fec-3.0.1.orig/debian/libfec3.install
+++ fec-3.0.1/debian/libfec3.install
@@ -0,0 +1 @@
+usr/lib/lib*.so.*
--- fec-3.0.1.orig/debian/libfec3-dev.install
+++ fec-3.0.1/debian/libfec3-dev.install
@@ -0,0 +1,5 @@
+usr/include/*
+usr/lib/lib*.a
+usr/lib/lib*.so
+usr/lib/pkgconfig/*
+usr/share/man/*/*
openSUSE Build Service is sponsored by