2
AC_DEFUN([dps_static_const],
3
[AC_MSG_CHECKING(whether ${CXX} supports static const definitions in classes)
4
AC_CACHE_VAL(dps_static_const_type,
9
AC_TRY_RUN([class x{public: static const int SCI=55; }; int main(){ x a; if ( a.SCI!=55 ) throw "err"; }],
10
dps_static_const_type=1,
11
dps_static_const_type=0,
12
dps_static_const_type=0)
14
if test $dps_static_const_type -eq 0; then
15
AC_TRY_RUN([class x{public: enum{ SCI=55 }; }; int main(){ x a; if ( a.SCI!=55 ) throw "err"; }],
16
dps_static_const_type=2,
17
dps_static_const_type=0,
18
dps_static_const_type=0)
23
if test $dps_static_const_type -eq 1; then
25
AC_DEFINE([LUCENE_STATIC_CONSTANT_SYNTAX], 1, [How to define a static const in a class])
26
elif test $dps_static_const_type -eq 2; then
28
AC_DEFINE([LUCENE_STATIC_CONSTANT_SYNTAX], 2, [How to define a static const in a class])
30
AC_MSG_ERROR([Cannot figure out how to write static consts in classes. Check the m4 script or upgrade your compiler])
b'\\ No newline at end of file'