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
|
#MIN_CONFIG(3.1)
AM_INIT_AUTOMAKE(krecipes, 0.8)
#KDE_USE_TQT(3.1)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
AC_ARG_WITH(sqlite3, AC_HELP_STRING([--without-sqlite3], [Don't compile SQLite3 backend support]), , with_sqlite3=yes)
AC_ARG_WITH(mysql, AC_HELP_STRING([--without-mysql], [Don't compile MySQL backend support]), , with_mysql=yes)
AC_ARG_WITH(postgresql, AC_HELP_STRING([--without-postgresql], [Don't compile PostgreSQL backend support]), , with_postgresql=yes)
dnl ----- Check if we should enable MySQL ------
if test "x$with_mysql" != "xno"; then
AC_DEFINE(HAVE_MYSQL, 1, [have MySQL])
have_mysql="true"
else
AC_DEFINE(HAVE_MYSQL, 0, [have MySQL])
have_mysql="false"
fi
dnl ----- Check if we should enable PostgreSQL ------
if test "x$with_postgresql" != "xno"; then
AC_DEFINE(HAVE_POSTGRESQL, 1, [have PostgreSQL])
have_postgresql="true"
else
AC_DEFINE(HAVE_POSTGRESQL, 0, [have PostgreSQL])
have_postgresql="false"
fi
dnl ------ Check for the SQLite headers -----
AC_DEFUN([AC_HAVE_SQLITE3],
[
AC_DEFINE(HAVE_SQLITE3, 1, [have SQLite3])
have_sqlite3=true
SQLITE_LIB3="-lsqlite3"
AC_SUBST(SQLITE_LIB3)
])
AC_DEFUN([AC_NO_SQLITE3],
[
AC_DEFINE(HAVE_SQLITE3, 0, [have SQLite3])
have_sqlite3=false
])
if test "x$with_sqlite3" != "xno"; then
KDE_CHECK_HEADER(sqlite3.h,
AC_HAVE_SQLITE3,
AC_NO_SQLITE3
)
else
AC_NO_SQLITE3
fi
dnl ----------- Should I link or should I not link? ---------
AM_CONDITIONAL(link_lib_MYSQL, test x$have_mysql = xtrue)
AM_CONDITIONAL(link_lib_POSTGRESQL, test x$have_postgresql = xtrue)
AM_CONDITIONAL(link_lib_SQLITE, test x$have_sqlite3 = xtrue)
dnl ----------- Should Krecipes be built at all? ------------
if test "x$have_mysql" = "xfalse" && test "x$have_postgresql" = "xfalse"; then
if test "x$have_sqlite3" = "xfalse"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE krecipes"
will_not_build_krecipes=true
fi
fi
|