forked from utelle/wxsqlite3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
98 lines (85 loc) · 3.48 KB
/
configure.ac
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
dnl Process this script with autoconf to create configure for wxsqlite3 library
dnl
dnl Copyright (C) 2017-2018 Ulrich Telle <[email protected]>, Vadim Zeitlin <[email protected]>
dnl
dnl This file is covered by the same licence as the entire wxSQLite3 package.
AC_INIT([wxsqlite3], [4.4.3], [[email protected]])
dnl This is the version tested with, might work with earlier ones.
AC_PREREQ([2.69])
AC_CONFIG_SRCDIR([include/wx/wxsqlite3.h])
AC_CONFIG_AUX_DIR([admin/build-aux])
AC_CONFIG_MACRO_DIR([admin/m4])
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
LT_INIT()
AC_PROG_CXX
AC_LANG(C++)
AC_ARG_VAR(WX_CONFIG, [Path to wx-config script (default: search in PATH).])
WX_CONFIG_OPTIONS
WX_CONFIG_CHECK([2.8.0],
[],
[AC_MSG_FAILURE([wxWidgets required but not detected.])],
[base,core]
)
AC_ARG_ENABLE(codec,
[ --enable-codec[=<codec type>] Specify the codec type:
aes128: AES 128 Bit CBC Encryption
aes256: AES 256 Bit CBC Encryption
chacha20 [default]: ChaCha20-Poly1305 Encryption
sqlcipher: SQLCipher Encryption],
[ if test "x$enableval" = "xaes128" ; then
codec_type=CODEC_TYPE_AES128
elif test "x$enableval" = "xaes256" ; then
codec_type=CODEC_TYPE_AES256
elif test "x$enableval" = "xchacha20" ; then
codec_type=CODEC_TYPE_CHACHA20
elif test "x$enableval" = "xsqlcipher" ; then
codec_type=CODEC_TYPE_SQLCIPHER
else
echo
echo "Error!"
echo "Unknown codec type"
exit -1
fi
AC_DEFINE_UNQUOTED([CODEC_TYPE], [$codec_type])
])
AC_ARG_ENABLE(sqlite-debug,
[ --enable-sqlite-debug Enable SQLite Debug assertions
This is a debugging feature
which should usually not be enabled],
[
AC_DEFINE([SQLITE_DEBUG])
])
dnl We only need the libraries above for the main library itself, but the
dnl pdfdc sample has additional requirements, check for them too (notice that
dnl we can't use "--optional-libs" wx-config option to do it all in one check
dnl for as long as we support 2.8 in which wx-config doesn't have this option
dnl yet).
core_WX_LIBS=$WX_LIBS
WX_CONFIG_CHECK([2.8.0],
[WX_LIBS_TREEVIEW_SAMPLE=$WX_LIBS],
[AC_MSG_WARN([Some wxWidgets libraries not available, treeview sample won't be built])],
[adv,base,core,xml]
)
WX_LIBS=$core_WX_LIBS
AM_CONDITIONAL([BUILD_TREEVIEW_SAMPLE], [test -n "$WX_LIBS_TREEVIEW_SAMPLE"])
dnl This is needed by WX_LIKE_LIBNAME
WX_DETECT_STANDARD_OPTION_VALUES
dnl This macro is used to preserve the same name as was used with the previous
dnl build systems only.
WX_LIKE_LIBNAME([WXSQLITE3_LIBNAME], [wxcode], [wxsqlite3])
AC_SUBST(WXSQLITE3_LIBNAME)
AC_SUBST(WX_LIBS_TREEVIEW_SAMPLE)
AC_SUBST( LIBDIR, "lib" )
dnl Ensure that the samples can find the files they need when running from the
dnl build directory.
AC_CONFIG_LINKS([samples/sqlcipher-1.1.8-testkey.db:samples/sqlcipher-1.1.8-testkey.db
samples/sqlcipher-2.0-beta-testkey.db:samples/sqlcipher-2.0-beta-testkey.db
samples/sqlcipher-2.0-be-testkey.db:samples/sqlcipher-2.0-be-testkey.db
samples/sqlcipher-2.0-le-testkey.db:samples/sqlcipher-2.0-le-testkey.db
samples/sqlcipher-3.0-testkey.db:samples/sqlcipher-3.0-testkey.db
samples/sqlcipher-4.0-testkey.db:samples/sqlcipher-4.0-testkey.db
])
AC_CONFIG_FILES([Makefile wxsqlite3.pc])
AC_OUTPUT