Changeset 318 for trunk/configure.ac


Ignore:
Timestamp:
May 15, 2012 4:57:11 AM (8 years ago)
Author:
kulshres
Message:

correct semantics of enable/disable switches in configure

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r316 r318  
    9393              [
    9494AS_HELP_STRING([--enable-debug],[enable ADOL-C debug mode [default=no]])],
    95   [AC_DEFINE(ADOLC_DEBUG,1,[ADOL-C debug mode])
    96    AC_MSG_RESULT(yes)
    97    adolc_debug="yes"],
    98   [AC_MSG_RESULT(no)
    99    adolc_debug="no"])
     95  [
     96  adolc_debug=$enableval
     97   AC_MSG_RESULT($adolc_debug)
     98   ],
     99  [
     100   adolc_debug=no
     101   AC_MSG_RESULT(no)
     102   ])
    100103
    101104AC_MSG_CHECKING(whether to use ADOL-C hard debug mode)
     
    104107AS_HELP_STRING([--enable-harddebug],[enable ADOL-C hard debug mode
    105108 [default=no]])],
    106   [AC_DEFINE(ADOLC_HARDDEBUG,1,[ADOL-C hard debug mode])
    107    AC_DEFINE(ADOLC_DEBUG,1,[ADOL-C debug mode])
    108    AC_MSG_RESULT(yes)
    109    adolc_harddebug="yes"],
    110   [AC_MSG_RESULT(no)
    111    adolc_harddebug="no"])
     109  [
     110   adolc_harddebug=$enableval
     111   AC_MSG_RESULT($adolc_harddebug)
     112   ],
     113  [
     114   adolc_harddebug=no
     115   AC_MSG_RESULT(no)
     116   ])
     117
     118if test x$adolc_harddebug == xyes ; then
     119adolc_debug=yes
     120AC_DEFINE(ADOLC_HARDDEBUG,1,[ADOL-C hard debug mode])
     121fi
     122
     123if test x$adolc_debug == xyes ; then
     124AC_DEFINE(ADOLC_DEBUG,1,[ADOL-C debug mode])
     125fi
    112126
    113127AC_MSG_CHECKING(whether standard adouble constructor shall zero value)
     
    116130AS_HELP_STRING([--enable-stdczero],[adouble standard constructor zeros value
    117131(at the cost of performance) [default=no]])],
    118   [AC_DEFINE(ADOLC_ADOUBLE_STDCZERO,1,[ADOL-C adouble zeroing mode])
    119    AC_MSG_RESULT(yes)
    120    adolc_stdczero="yes"],
    121   [AC_MSG_RESULT(no)
    122    adolc_stdczero="no"])
     132  [
     133  adolc_stdczero=$enableval
     134  AC_MSG_RESULT($adolc_stdczero)
     135  ],
     136  [
     137  adolc_stdczero=no
     138  AC_MSG_RESULT(no)
     139  ])
     140
     141if test x$adolc_stdczero == xyes ; then
     142AC_DEFINE(ADOLC_ADOUBLE_STDCZERO,1,[ADOL-C adouble zeroing mode])
     143fi
    123144
    124145AC_MSG_CHECKING(whether errno is thread save)
     
    126147              [
    127148AS_HELP_STRING([--enable-tserrno],[use errno as thread number cache [default=no]])],
    128   [AC_DEFINE(ADOLC_THREADSAVE_ERRNO,1,[ADOL-C thread save errno mode])
    129    AC_MSG_RESULT(yes)
    130    adolc_tserrno="yes"],
    131   [AC_MSG_RESULT(no)
    132    adolc_tserrno="no"])
     149  [
     150  adolc_tserrno=$enableval
     151  AC_MSG_RESULT($adolc_tserrno)
     152   ],
     153  [
     154  adolc_tserrno=no
     155  AC_MSG_RESULT(no)
     156  ])
     157
     158if test x$adolc_tserrno == xyes ; then
     159AC_DEFINE(ADOLC_THREADSAVE_ERRNO,1,[ADOL-C thread save errno mode])
     160fi
    133161
    134162AC_MSG_CHECKING(whether external function call forces backup of all adoubles)
     
    136164              [
    137165AS_HELP_STRING([--enable-safe-extern],[backup all adoubles before calling an external function [default=no]])],
    138   [AC_DEFINE(ADOLC_SAFE_EXTERN,1,[ADOL-C safe extern mode])
    139    AC_MSG_RESULT(yes)
    140    adolc_safe_extern="yes"],
    141   [AC_MSG_RESULT(no)
    142    adolc_safe_extern="no"])
     166  [
     167  adolc_safe_extern=$enableval
     168  AC_MSG_RESULT($adolc_safe_extern)
     169  ],
     170  [
     171  adolc_safe_extern=no
     172  AC_MSG_RESULT(no)
     173  ])
     174
     175if test x$adolc_safe_extern == xyes ; then
     176AC_DEFINE(ADOLC_SAFE_EXTERN,1,[ADOL-C safe extern mode])
     177fi
    143178
    144179AC_MSG_CHECKING(which flag to use to enable OpenMP)
     
    147182                            [use FLAG to enable OpenMP at compile time [default=none]])],
    148183            [ac_adolc_openmpflag=$withval
    149              msg_result=$withval
    150184             AC_MSG_RESULT($ac_adolc_openmpflag)],
    151185            [ac_adolc_openmpflag=""
    152              msg_result="none"
    153              AC_MSG_RESULT($ac_adolc_openmpflag)])
     186             AC_MSG_RESULT(none)])
    154187
    155188
     
    160193AS_HELP_STRING([--enable-sparse],[build sparse drivers [default=disabled]])],
    161194            [sparse=$enableval
    162              AC_MSG_RESULT(yes)],
     195             AC_MSG_RESULT($sparse)],
    163196            [sparse="no"
    164197             AC_MSG_RESULT(no)])
Note: See TracChangeset for help on using the changeset viewer.