Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / khotkeys / configure.in.in
bloba63e521c4f2f404ba9dba4ef1f495c165a24a960
1 dnl ---------------------------------------------------------------------------
2 dnl check if compiler compiles correctly something like this :
3 dnl class A { virtual A* me(); };
4 dnl class X {};
5 dnl class B : public X, public A { virtual B* me(); };
6 dnl stupid gcc doesn't even bother to warn it can't do it correctly
7 dnl ---------------------------------------------------------------------------
9 AC_MSG_CHECKING(if covariant return works)
10 AC_CACHE_VAL(kde_cv_covariant_return,
11     [
12     kde_cv_covariant_return=no
13     AC_LANG_SAVE
14     AC_LANG_CPLUSPLUS
15     AC_TRY_RUN( 
16         [
17         class A { public: virtual A* me(); };
18         class X { public: int x; virtual void ff() {}; };
19         class B : public X, public A { public: virtual B* me(); };
20         int foo( A* a )
21             {
22             A* aa = a->me();
23             return a == aa;
24             }
25         int main()
26             {
27             B* b = new B;
28             return foo( b ) == 0;
29             }
30         A* A::me() { return this; }
31         B* B::me() { return this; }
32         ],
33         [ kde_cv_covariant_return=yes ])
34     AC_LANG_RESTORE
35     ])
37 if test "$kde_cv_covariant_return" = "no"; then
38     AC_MSG_RESULT(no)
39     AC_DEFINE(COVARIANT_RETURN_BROKEN, 1,
40         [Define if covariant return in virtual methods works])
41 else
42     AC_MSG_RESULT(yes)
46 dnl ---------------------------------------------------------------------------
47 dnl check if compiler can compile something like this :
48 dnl class A { public: void foo( int ); };
49 dnl class B : public A { public: using A::foo; void foo( char ); }
50 dnl gcc 2.95.x fails with an error message
51 dnl ---------------------------------------------------------------------------
53 AC_MSG_CHECKING(for working using)
54 AC_CACHE_VAL(kde_cv_working_using,
55     [
56     kde_cv_working_using=no
57     AC_LANG_SAVE
58     AC_LANG_CPLUSPLUS
59     AC_TRY_COMPILE( 
60         [],[
61         class A { public: void foo( int ); };
62         class B : public A { public: using A::foo; void foo( char ); };
63         ],
64         [ kde_cv_working_using=yes ])
65     AC_LANG_RESTORE
66     ])
68 if test "$kde_cv_working_using" = "yes"; then
69     AC_MSG_RESULT(yes)
70     AC_DEFINE(HAVE_WORKING_USING, 1,
71         [Define if the using keyword works correctly])
72 else
73     AC_MSG_RESULT(no)
77 dnl ---------------------------------------------------------------------------
78 dnl check for arts for speech recognition
79 dnl ---------------------------------------------------------------------------
82 artsc_config_test_path=$prefix/bin:$exec_prefix/bin:$KDEDIR/bin:$PATH
83 AC_PATH_PROG(ARTSCCONFIG, artsc-config, no, $artsc_config_test_path)
85 if test "x$build_arts" = "xyes" && test "x$ARTSCCONFIG" != "xno" ; then
86         LIB_ARTS="-lartskde"
87         ARTS_PREFIX=[`$ARTSCCONFIG --arts-prefix`]
88         ARTS_CFLAGS="-I$ARTS_PREFIX/include/arts"
89         AC_DEFINE(HAVE_ARTS, 1, [Defined for arts support in khotkeys])
90         KHOTKEYS_ARTS_SUBDIR=arts
91 else
92         LIB_ARTS=""
93         ARTS_CFLAGS=""
94         KHOTKEYS_ARTS_SUBDIR=
97 AC_SUBST(LIB_ARTS)
98 AC_SUBST(ARTS_CFLAGS)
99 AC_SUBST(KHOTKEYS_ARTS_SUBDIR)