~ubuntu-branches/ubuntu/lucid/boinc/lucid-backports

« back to all changes in this revision

Viewing changes to m4/boinc_check_flags.m4

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayorga
  • Date: 2009-05-23 13:29:17 UTC
  • mfrom: (1.3.1 upstream) (9.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090523132917-3rvmkmkxbw17181o
Tags: 6.4.5+dfsg-2
* Uploaded to unstable
* Include a patch picked from Upstream SVN
   to avoid FTBFSs whith gcc 4.4 (Closes: #526666)
* remove CUDA dir that contais binary-only non DFSG software
* change section from boinc-dbg to debug
* set orig +dfsg since we remove non-dfsg software 
  when we pull the tag from upstream
  + Add Comments about this on README.Source
* Move schedtool to Recommends, (Closes: #532133)
* Add ru debconf templates translation, thanks
  to Yuri Kozlov <yuray@komyakino.ru> (Closes: #531205)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
AC_DEFUN([BOINC_CHECK_CFLAG],[
 
3
  AC_LANG_PUSH(C)
 
4
  sv_flags="${CFLAGS}"
 
5
  AC_MSG_CHECKING(if C compiler supports $1)
 
6
  CFLAGS="${CFLAGS} $1"
 
7
  AC_LINK_IFELSE([
 
8
    AC_LANG_PROGRAM([[
 
9
      #define CONFIG_TEST
 
10
      int foo() {return 1;}
 
11
    ]],
 
12
    [ return foo(); ])],
 
13
    [
 
14
      AC_MSG_RESULT(yes)
 
15
      $2
 
16
    ],
 
17
    [ 
 
18
      AC_MSG_RESULT(no)
 
19
      CFLAGS="${sv_flags}"
 
20
      $3
 
21
    ]
 
22
  )
 
23
  AC_LANG_POP
 
24
])
 
25
 
 
26
AC_DEFUN([BOINC_CHECK_CXXFLAG],[
 
27
  AC_LANG_PUSH(C++)
 
28
  sv_flags="${CXXFLAGS}"
 
29
  AC_MSG_CHECKING(if C++ compiler supports $1)
 
30
  CXXFLAGS="${CXXFLAGS} $1"
 
31
  AC_LINK_IFELSE([
 
32
    AC_LANG_PROGRAM([[
 
33
      #define CONFIG_TEST
 
34
      int foo() {return 1;}
 
35
    ]],
 
36
    [ return foo(); ])],
 
37
    [
 
38
      AC_MSG_RESULT(yes)
 
39
      $2
 
40
    ],
 
41
    [ 
 
42
      AC_MSG_RESULT(no)
 
43
      CXXFLAGS="${sv_flags}"
 
44
      $3
 
45
    ]
 
46
  )
 
47
  AC_LANG_POP
 
48
])
 
49
 
 
50
AC_DEFUN([BOINC_CHECK_FFLAG],[
 
51
  AC_LANG_PUSH(Fortran 77)
 
52
  sv_flags="${FFLAGS}"
 
53
  AC_MSG_CHECKING(if f77 compiler supports $1)
 
54
  FFLAGS="${FFLAGS} $1"
 
55
  AC_LINK_IFELSE([
 
56
    AC_LANG_PROGRAM([],
 
57
    [      write(*,*) 'hello' ])],
 
58
    [
 
59
      AC_MSG_RESULT(yes)
 
60
      $2
 
61
    ],
 
62
    [ 
 
63
      AC_MSG_RESULT(no)
 
64
      FFLAGS="${sv_flags}"
 
65
      $3
 
66
    ]
 
67
  )
 
68
  AC_LANG_POP
 
69
])
 
70
 
 
71
 
 
72
AC_DEFUN([BOINC_CHECK_LDFLAG],[
 
73
  AC_LANG_PUSH(C)
 
74
  sv_flags="${LDFLAGS}"
 
75
  AC_MSG_CHECKING(if $LD supports $1)
 
76
  LDFLAGS="${LDFLAGS} $1"
 
77
  AC_LINK_IFELSE([
 
78
    AC_LANG_PROGRAM([[
 
79
      #define CONFIG_TEST
 
80
      int foo() {return 1;}
 
81
    ]],
 
82
    [ return foo(); ])],
 
83
    [
 
84
      AC_MSG_RESULT(yes)
 
85
      $2
 
86
    ],
 
87
    [ 
 
88
      AC_MSG_RESULT(no)
 
89
      LDFLAGS="${sv_flags}"
 
90
      $3
 
91
    ]
 
92
  )
 
93
  AC_LANG_POP
 
94
])