~ubuntu-branches/ubuntu/maverick/libvirt/maverick

« back to all changes in this revision

Viewing changes to m4/compiler-flags.m4

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-02-11 01:01:42 UTC
  • mto: (3.4.1 sid) (1.2.1 upstream) (0.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090211010142-wk9mgtbw8bmp3zcb
Tags: upstream-0.6.0
ImportĀ upstreamĀ versionĀ 0.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
   AC_SUBST(COMPILER_FLAGS)
26
26
   ac_save_CFLAGS="$CFLAGS"
27
27
   CFLAGS="$CFLAGS $1"
28
 
   AC_TRY_COMPILE(,
29
 
    [int x;],
30
 
    COMPILER_FLAGS="$COMPILER_FLAGS $1"
31
 
    AC_MSG_RESULT(yes),
32
 
    AC_MSG_RESULT(no))
33
 
  CFLAGS="$ac_save_CFLAGS"
 
28
   AC_TRY_LINK([], [], has_option=yes, has_option=no,)
 
29
   echo 'int x;' >conftest.c
 
30
   $CC $CFLAGS -c conftest.c 2>conftest.err
 
31
   ret=$?
 
32
   if test $ret != 0 -o -s conftest.err -o $has_option = "no"; then
 
33
       AC_MSG_RESULT(no)
 
34
   else
 
35
       AC_MSG_RESULT(yes)
 
36
       COMPILER_FLAGS="$COMPILER_FLAGS $1"
 
37
   fi
 
38
   CFLAGS="$ac_save_CFLAGS"
 
39
   rm -f conftest*
34
40
 ])