Changeset 1500 for trunk/configure.ac


Ignore:
Timestamp:
Sep 15, 2008, 8:47:37 PM (13 years ago)
Author:
Peter
Message:

Added structure to deprecate functions. I chose to use a gcc style,
and it is tested in configure whether the compiler supports it. If not
the deprecation has no effect. Using a deprecated function will cause
a compiler warning. In gcc the warning can be turned off with
'-Wno-deprecated'. Possibly we should turn off the warning by default,
so a user has to turn it on by defining
-DYAT_DISABLE_DEPRECATED...

fixes #367

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r1497 r1500  
    228228   AC_MSG_RESULT($has_infinity)])
    229229
     230AC_MSG_CHECKING([g++ deprecation attribute])
     231AC_TRY_COMPILE([void f() __attribute__ ((deprecated));], [],
     232               AC_DEFINE([YAT_HAVE_GCC_DEPRECATED], [1],
     233          [Define if compiler supports deprecated attribute, as in g++ 4.0])
     234               AC_MSG_RESULT([yes]),
     235               AC_MSG_RESULT([no]) )
     236
    230237
    231238# yat specific settings
     
    262269AC_CONFIG_FILES([build_support/yat-config],
    263270                [chmod +x build_support/yat-config])
     271
     272AC_CONFIG_HEADER([yat/utility/config_public.h])
    264273
    265274# warning about missing doxygen
Note: See TracChangeset for help on using the changeset viewer.