~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to extern/fftw/tools/fftw-wisdom-to-conf.in

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
if test "x$1" = "x--help" || test "x$1" = "x-h"; then
 
4
    cat <<EOF
 
5
Usage: fftw-wisdom-to-conf [OPTIONS] [< INPUT] [> OUTPUT]
 
6
Convert wisdom (stdin) to C configuration routine (stdout).
 
7
 
 
8
Options:
 
9
        -h, --help: print this help
 
10
     -V, --version: print version/copyright info
 
11
EOF
 
12
    exit 0
 
13
fi
 
14
 
 
15
if test "x$1" = "x--version" || test "x$1" = "x-V"; then
 
16
    cat <<EOF
 
17
fftw-wisdom-to-conf from FFTW version @VERSION@
 
18
 
 
19
Copyright (c) 2003, 2006 Matteo Frigo
 
20
Copyright (c) 2003, 2006 Massachusetts Institute of Technology
 
21
 
 
22
This program is free software; you can redistribute it and/or modify
 
23
it under the terms of the GNU General Public License as published by
 
24
the Free Software Foundation; either version 2 of the License, or
 
25
(at your option) any later version.
 
26
 
 
27
This program is distributed in the hope that it will be useful,
 
28
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
29
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
30
GNU General Public License for more details.
 
31
 
 
32
You should have received a copy of the GNU General Public License
 
33
along with this program; if not, write to the Free Software
 
34
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    
 
35
EOF
 
36
    exit 0
 
37
fi
 
38
 
 
39
read preamble fftw_wisdom
 
40
 
 
41
case "$preamble $fftw_wisdom" in
 
42
        \(@PACKAGE@-@VERSION@\ *_wisdom)
 
43
                prefix=`echo $fftw_wisdom | cut -d_ -f1`_
 
44
                ;;
 
45
        *)
 
46
                echo "fftw-wisdom-to-conf: invalid wisdom" 1>&2
 
47
                exit 1
 
48
                ;;
 
49
esac
 
50
 
 
51
cat <<EOF
 
52
/* Automatically generated by fftw-wisdom-to-conf from @PACKAGE@ @VERSION@.
 
53
   DO NOT EDIT!  (Unless you really, really want to.  Then it's okay.) */
 
54
void ${prefix}configure_planner(void *plnr)
 
55
{
 
56
    struct solvtab_s { void (*reg)(void *); const char *reg_nam; };
 
57
    extern void ${prefix}solvtab_exec(const struct solvtab_s s[], void *);
 
58
 
 
59
#define DECLARE(name) extern void name(void *);
 
60
#define STRINGIZEx(x) #x
 
61
#define STRINGIZE(x) STRINGIZEx(x)
 
62
#define SOLVTAB(s) { s, STRINGIZE(s) },
 
63
#define DO(X) \\
 
64
EOF
 
65
 
 
66
sed 's/ *(//' | cut -d" " -f1 | grep -v -- - | egrep -v '^ *\)*$' | sort | uniq | while read reg_nam; do
 
67
    echo "    X($reg_nam)\\"
 
68
done
 
69
 
 
70
cat <<EOF
 
71
    /* end DO(X) */
 
72
 
 
73
    DO(DECLARE)
 
74
 
 
75
    const struct solvtab_s s[] = {
 
76
        DO(SOLVTAB)
 
77
        { 0, 0 }
 
78
    };
 
79
 
 
80
    ${prefix}solvtab_exec(s, plnr);
 
81
}
 
82
EOF