~ubuntu-branches/ubuntu/natty/pd-zexy/natty

« back to all changes in this revision

Viewing changes to src/acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard, IOhannes m zmölnig, Jonas Smedegaard
  • Date: 2010-08-20 12:17:41 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100820121741-4kxozn8b9rhee9fr
Tags: 2.2.3-1
* New upstream version

[ IOhannes m zmölnig ]
* Adopt package, on behalf of Multimedia Team.
  Closes: #546964
* Simply debian/rules with CDBS, and don't unconditionally strip
  binaries.
  Closes: #437763
* Install into /usr/lib/pd/extra/zexy/. Document usage in REAME.Debian
  and warn about change in NEWS.
* git'ify package. Add Vcs-* stanzas to control file.
* Use dpkg source format 3.0 (quilt). Drop build-dependency on quilt.

[ Jonas Smedegaard ]
* Enable CDBS copyright-check routine.
* Add copyright and licensing header to debian/rules.
* Add myself as uploader.
* Rewrite debian/copyright using rev. 135 of draft DEP5 format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Copyright (C) 2005-2006 IOhannes m zm�lnig
 
2
dnl This file is free software; IOhannes m zm�lnig
 
3
dnl gives unlimited permission to copy and/or distribute it,
 
4
dnl with or without modifications, as long as this notice is preserved.
 
5
 
 
6
# AC_CHECK_CPPFLAGS(ADDITIONAL-CPPFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
 
7
#
 
8
# checks whether the $(C) compiler accepts the ADDITIONAL-CPPFLAGS
 
9
# if so, they are added to the CPPFLAGS
 
10
AC_DEFUN([AC_CHECK_CPPFLAGS],
 
11
[
 
12
  AC_MSG_CHECKING([whether $CPP accepts "$1"])
 
13
  temp_check_cppflags="${CPPFLAGS}"
 
14
  CPPFLAGS="$1 ${CPPFLAGS}"
 
15
  AC_PREPROC_IFELSE(
 
16
        [AC_LANG_SOURCE([[int main(void){return 0;}]])],
 
17
        [AC_MSG_RESULT([yes])],
 
18
        [AC_MSG_RESULT([no]); CPPFLAGS="${temp_check_cppflags}"])
 
19
])# AC_CHECK_CPPFLAGS
 
20
 
 
21
 
 
22
 
 
23
# AC_CHECK_CFLAGS(ADDITIONAL-CFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
 
24
#
 
25
# checks whether the $(C) compiler accepts the ADDITIONAL-CFLAGS
 
26
# if so, they are added to the CFLAGS
 
27
AC_DEFUN([AC_CHECK_CFLAGS],
 
28
[
 
29
  AC_MSG_CHECKING([whether $CC accepts "$1"])
 
30
cat > conftest.c << EOF
 
31
int main(){
 
32
  return 0;
 
33
}
 
34
EOF
 
35
if $CC $CFLAGS [$1] -o conftest.o conftest.c > /dev/null 2>&1
 
36
then
 
37
  AC_MSG_RESULT([yes])
 
38
  CFLAGS="${CFLAGS} [$1]"
 
39
  AC_CHECK_CPPFLAGS([$1])
 
40
  [$2]
 
41
else
 
42
  AC_MSG_RESULT([no])
 
43
  [$3]
 
44
fi
 
45
])# AC_CHECK_CFLAGS
 
46
 
 
47
# AC_CHECK_CXXFLAGS(ADDITIONAL-CXXFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
 
48
#
 
49
# checks whether the $(CXX) (c++) compiler accepts the ADDITIONAL-CXXFLAGS
 
50
# if so, they are added to the CXXFLAGS
 
51
AC_DEFUN([AC_CHECK_CXXFLAGS],
 
52
[
 
53
  AC_MSG_CHECKING([whether $CXX accepts "$1"])
 
54
cat > conftest.c++ << EOF
 
55
int main(){
 
56
  return 0;
 
57
}
 
58
EOF
 
59
if $CXX $CPPFLAGS $CXXFLAGS -o conftest.o conftest.c++ [$1] > /dev/null 2>&1
 
60
then
 
61
  AC_MSG_RESULT([yes])
 
62
  CXXFLAGS="${CXXFLAGS} [$1]"
 
63
  AC_CHECK_CPPFLAGS([$1])
 
64
  [$2]
 
65
else
 
66
  AC_MSG_RESULT([no])
 
67
  [$3]
 
68
fi
 
69
])# AC_CHECK_CXXFLAGS
 
70
 
 
71
# AC_CHECK_FRAMEWORK(FRAMEWORK, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
 
72
#
 
73
#
 
74
AC_DEFUN([AC_CHECK_FRAMEWORK],
 
75
[
 
76
  AC_MSG_CHECKING([for "$1"-framework])
 
77
 
 
78
  temp_check_ldflags_org="${LDFLAGS}"
 
79
  LDFLAGS="-framework [$1] ${LDFLAGS}"
 
80
 
 
81
  AC_LINK_IFELSE(AC_LANG_PROGRAM(,), [temp_check_ldflags_success="yes"],[temp_check_ldflags_success="no"])
 
82
 
 
83
  if test "x$temp_check_ldflags_success" = "xyes"; then
 
84
    AC_MSG_RESULT([yes])
 
85
    [$2]
 
86
  else
 
87
    AC_MSG_RESULT([no])
 
88
    LDFLAGS="$temp_check_ldflags_org"
 
89
    [$3]
 
90
  fi
 
91
])# AC_CHECK_FRAMEWORK
 
92
 
 
93
# AC_CHECK_LDFLAGS(ADDITIONAL-LDFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
 
94
#
 
95
# checks whether the $(LD) linker accepts the ADDITIONAL-LDFLAGS
 
96
# if so, they are added to the LDFLAGS
 
97
AC_DEFUN([AC_CHECK_LDFLAGS],
 
98
[
 
99
  AC_MSG_CHECKING([whether linker accepts "$1"])
 
100
  temp_check_ldflags_org="${LDFLAGS}"
 
101
  LDFLAGS="$1 ${LDFLAGS}"
 
102
 
 
103
  AC_LINK_IFELSE(AC_LANG_PROGRAM(,), [temp_check_ldflags_success="yes"],[temp_check_ldflags_success="no"])
 
104
 
 
105
  if test "x$temp_check_ldflags_success" = "xyes"; then
 
106
    AC_MSG_RESULT([yes])
 
107
    [$2]
 
108
  else
 
109
    AC_MSG_RESULT([no])
 
110
    LDFLAGS="$temp_check_ldflags_org"
 
111
    [$3]
 
112
  fi
 
113
])# AC_CHECK_LDFLAGS
 
114
 
 
115
 
 
116
AC_DEFUN([AC_CHECK_FAT],
 
117
[
 
118
AC_ARG_ENABLE(fat-binary,
 
119
       [  --enable-fat-binary=ARCHS
 
120
                          build an Apple Multi Architecture Binary (MAB);
 
121
                          ARCHS is a comma-delimited list of architectures for
 
122
                          which to build; if ARCHS is omitted, then the package
 
123
                          will be built for all architectures supported by the
 
124
                          platform (e.g. "ppc,i386" for MacOS/X and Darwin; 
 
125
                          if this option is disabled or omitted entirely, then
 
126
                          the package will be built only for the target 
 
127
                          platform],
 
128
       [fat_binary=$enableval], [fat_binary=no])
 
129
if test "$fat_binary" != no; then
 
130
    AC_MSG_CHECKING([target architectures])
 
131
 
 
132
    # Respect TARGET_ARCHS setting from environment if available.
 
133
    if test -z "$TARGET_ARCHS"; then
 
134
        # Respect ARCH given to --enable-fat-binary if present.
 
135
     if test "$fat_binary" != yes; then
 
136
            TARGET_ARCHS=`echo "$fat_binary" | tr ',' ' '`
 
137
     else
 
138
            # Choose a default set of architectures based upon platform.
 
139
      TARGET_ARCHS="ppc i386"
 
140
     fi
 
141
    fi
 
142
    AC_MSG_RESULT([$TARGET_ARCHS])
 
143
 
 
144
   define([Name],[translit([$1],[./-], [___])])
 
145
   # /usr/lib/arch_tool -archify_list $TARGET_ARCHS
 
146
   []Name=""
 
147
   for archs in $TARGET_ARCHS 
 
148
   do
 
149
    []Name="$[]Name -arch $archs"
 
150
   done
 
151
 
 
152
   if test "x$[]Name" != "x"; then
 
153
    AC_CHECK_CFLAGS($[]Name,,[]Name="")
 
154
   fi
 
155
 
 
156
   if test "x$[]Name" != "x"; then
 
157
    AC_CHECK_LDFLAGS($[]Name,,[]Name="")
 
158
   fi
 
159
 
 
160
   undefine([Name])
 
161
fi
 
162
])# AC_CHECK_FAT