summaryrefslogtreecommitdiffstats
path: root/kexi/main/configure.in.in
blob: 946a13965748d941f19b1937a4a3f00e71b7e431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102

dnl ======================================
dnl TDENewStuff Configuration
dnl ======================================
dnl
dnl Copyright (C) 2004 Josef Spillner <[email protected]>
dnl This file is to be used within TDE's build system.
dnl It defines $(LIB_TDENEWSTUFF) if tdenewstuff has been found,
dnl and a HAVE_TDENEWSTUFF #define statement is added.
dnl

AC_MSG_CHECKING([for TDE library: tdenewstuff])

ac_tdenewstuff_includes=NO ac_tdenewstuff_libraries=NO
tdenewstuff_libraries=""
tdenewstuff_includes=""

AC_CACHE_VAL(ac_cv_have_tdenewstuff,
[
AC_FIND_FILE(tdenewstuff/downloaddialog.h, $kde_incdirs, tdenewstuff_incdir)
ac_tdenewstuff_includes="$tdenewstuff_incdir"

AC_FIND_FILE(libtdenewstuff.so, $kde_libdirs, tdenewstuff_libdir)
ac_tdenewstuff_libraries="$tdenewstuff_libdir"

if test "$ac_tdenewstuff_includes" = NO || test "$ac_tdenewstuff_libraries" = NO; then
  ac_cv_have_tdenewstuff="have_tdenewstuff=no"
  ac_tdenewstuff_notfound=""
else
  have_tdenewstuff="yes"
fi
])

eval "$ac_cv_have_tdenewstuff"

if test "$have_tdenewstuff" != yes; then
  AC_MSG_RESULT([$have_tdenewstuff])
else
  AC_MSG_RESULT([$have_tdenewstuff (libraries $ac_tdenewstuff_libraries, headers $ac_tdenewstuff_includes)])

dnl  AC_DEFINE_UNQUOTED(HAVE_TDENEWSTUFF, 1, [Add TDENewStuff functionality.])
  CXXFLAGS="$CXXFLAGS -DHAVE_TDENEWSTUFF"

  LIB_TDENEWSTUFF='-ltdenewstuff'
  AC_SUBST(LIB_TDENEWSTUFF)
fi

AC_CHECK_FILE([kexi/3rdparty/kexifeedbackwizard/lib/kexifeedbackwizard.cpp],
  have_internal_feedback="yes"
,
  have_internal_feedback="no"
)

AC_MSG_CHECKING([for TDE library: kfeedbackwizard])

ac_kfeedback_includes=NO ac_kfeedback_libraries=NO
kfeedback_libraries=""
kfeedback_includes=""

AC_CACHE_VAL(ac_cv_have_kfeedback,
[
AC_FIND_FILE(kfeedbackwizard.h, $kde_incdirs, kfeedback_incdir)
ac_kfeedback_includes="$kfeedback_incdir"

AC_FIND_FILE(libkfeedbackwizard.so, $kde_libdirs, kfeedback_libdir)
ac_kfeedback_libraries="$kfeedback_libdir"

if test "$ac_kfeedback_includes" = NO || test "$ac_kfeedback_libraries" = NO; then
  ac_cv_have_kfeedback="have_kfeedback=no"
  ac_kfeedback_notfound=""
else
  have_kfeedback="yes"
fi
])

eval "$ac_cv_have_kfeedback"

INC_KFEEDBACK=''
LIB_KFEEDBACK=''
if test "$have_kfeedback" != yes; then
  if test "$have_internal_feedback" = yes; then
    CXXFLAGS="$CXXFLAGS -DFEEDBACK_CLASS=KexiFeedbackWizard -DFEEDBACK_INCLUDE=\"<kexifeedbackwizard.h>\""
    use_kexifb="yes"
    AC_MSG_RESULT([using internal])
    INC_KFEEDBACK='-I../3rdparty/kexifeedbackwizard/lib'
    LIB_KFEEDBACK='../3rdparty/kexifeedbackwizard/lib/libkexifeedbackwizard.la'
  else
    use_kexifb="no"
    AC_MSG_RESULT([dont use])
  fi
else
  use_kexifb="no"
  AC_MSG_RESULT([$have_kfeedback (libraries $ac_kfeedback_libraries, headers $ac_kfeedback_includes)])

dnl  AC_DEFINE_UNQUOTED(HAVE_KFEEDBACK, 1, [Add TDENewStuff functionality.])
  CXXFLAGS="$CXXFLAGS -DFEEDBACK_CLASS=KFeedbackWizard -DFEEDBACK_INCLUDE=\"<kfeedbackwizard.h>\""

  LIB_KFEEDBACK='-lkfeedbackwizard'
fi
AC_SUBST(LIB_KFEEDBACK)
AC_SUBST(INC_KFEEDBACK)
AM_CONDITIONAL(use_kexifeedback, test "$use_kexifb" = "yes")