Changeset 3436702 for configure.in


Ignore:
Timestamp:
10/26/05 16:32:07 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
767bd50
Parents:
6f75b9d
Message:

autoconf test for attribute((pure))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    r437d002 r3436702  
    121121AC_PROG_GCC_TRADITIONAL
    122122AC_CHECK_FUNCS(socket strdup)
     123
     124# configure time option for __attribute__((pure))
     125test_pure=true
     126AC_ARG_WITH(pure,
     127            AC_HELP_STRING([--with-pure],
     128                           [use __attribute__((pure)) for optimisation]),
     129[
     130        if test "$withval" = no
     131        then
     132                test_pure=false
     133        else
     134                test_pure=true
     135        fi
     136],[
     137        test_pure=true
     138])
     139
     140libtrace_pure=false
     141if test "$test_pure" = true; then
     142        AC_MSG_CHECKING([if compiler supports __attribute__((pure))])
     143        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
     144                           [[#define SIMPLE_FUNCTION __attribute__((pure))]])],
     145                [AC_DEFINE(HAVE_ATTR_PURE,1,[define to test for __attribute__((pure)) support]) libtrace_pure=true],
     146                [AC_DEFINE(HAVE_ATTR_PURE,0,[define to test for __attribute__((pure)) support]) libtrace_pure=false])
     147
     148        AC_MSG_RESULT($libtrace_pure)
     149fi
    123150
    124151# configure time options for man pages
     
    288315reportopt "Compiled with PCAP support" $libtrace_pcap
    289316reportopt "Compiled with compressed trace (zlib) support" $libtrace_zlib
     317reportopt "Compiled with __attribute__((pure))" $libtrace_pure
    290318reportopt "Compiled with DAG support (libdag)" $libtrace_dag
    291319reportopt "Compiled with DAG support (DAG 2.4)" $libtrace_dag2_4
Note: See TracChangeset for help on using the changeset viewer.