|
1 | | -# ====================================================================================== |
2 | | -# Author: Francesco Montorsi |
3 | | -# RCS-ID: $Id: configure.ac,v 1.12 2007/11/10 09:06:31 utelle Exp $ |
4 | | -# |
5 | | -# A basic "configure.ac" for a wxCode component. |
6 | | -# See |
7 | | -# http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_mono/autoconf.html |
8 | | -# for more info about autoconf and the autoconf macros. |
9 | | -# ====================================================================================== |
10 | | - |
11 | | -# Init this configure script with basic info about the component |
12 | | -# (DON'T PUT ANYTHING BEFORE AC_INIT, JUST COMMENTS) |
13 | | -AC_INIT([wxSqlite3], [3.3.0], [utelle@users.sourceforge.net]) |
14 | | -AC_CONFIG_AUX_DIR(build) |
15 | | - |
16 | | -# ENABLES/DISABLES THE DEBUG MODE FOR THIS CONFIGURE SCRIPT |
17 | | -#WX_DEBUG_CONFIGURE=1 |
18 | | - |
19 | | -# you need the wxCode/build/bakefiles in your local repository to generate a configure |
20 | | -# script from this configure.ac file since wxcode.m4 is required.... |
21 | | -m4_include(../wxcode/autoconf/wxcode.m4) |
22 | | -WXCODE_INIT |
23 | | - |
24 | | -## CONFIGURE OPTIONS |
25 | | -## |
26 | | -## Before starting checks, declare the options of this configure script |
27 | | -## Here you should use the AC_ARG_ENABLE and AC_ARG_WITH macros |
28 | | -## or the wxCode-specific AM_WXCODE_ARG_ENABLE & AM_WXCODE_ARG_WITH macros, |
29 | | -## to add to this configure script the --enable-XXX and/or --with-XXX |
30 | | -## options required. If you did not use any <option> tag in your |
31 | | -## component's bakefile, then you can leave this section as is |
32 | | -##################################################################### |
33 | | - |
34 | | -WXCODE_OPTIONS([debug,unicode,shared,toolkit,wxshared,wxversion]) |
35 | | - |
36 | | -AC_ARG_WITH([sqlite3_prefix], |
37 | | - AC_HELP_STRING([--with-sqlite3-prefix], |
38 | | - [Prefix where sqlite3 is installed (optional; default is /usr/local)]),, |
39 | | - [with_sqlite3_prefix=/usr/local]) |
40 | | -SQLITE3_DIR=$with_sqlite3_prefix |
41 | | -AC_SUBST(SQLITE3_DIR) |
42 | | - |
43 | | - |
44 | | -## CONFIGURE CHECKS |
45 | | -## |
46 | | -## Here you should use the AC_CHECK_LIB, AC_COMPILE_IFELSE, |
47 | | -## AC_LINK_IFELSE, etc macros to check that the libraries required |
48 | | -## by your component exist on the host machine and match your |
49 | | -## required options (version, build settings, etc) |
50 | | -##################################################################### |
51 | | - |
52 | | -# argument 1: here put the minimum required version of wx |
53 | | -# argument 2: here you must put a comma-separed list of all wx required libraries |
54 | | -# except for base,core (e.g. "xml,net,adv"); leave empty if you use only core & base |
55 | | -WXCODE_CHECKS([2.8.0], [core,base,adv]) |
56 | | - |
57 | | -WXCODE_ARG_ENABLE([dynamic_load], [Enables the SQLite dynamic load support], [no]) |
58 | | -AC_MSG_CHECKING([for the --enable-dynamic-load option]) |
59 | | -if test "$enable_dynamic_load" = "yes"; then |
60 | | - USE_DYNAMIC_SQLITE3_LOAD=1 |
61 | | - AC_MSG_RESULT([yes]) |
62 | | -else |
63 | | - USE_DYNAMIC_SQLITE3_LOAD=0 |
64 | | - AC_MSG_RESULT([no]) |
65 | | -fi |
66 | | - |
67 | | -WXCODE_ARG_ENABLE([metadata], [Enables the wxSQLite3 meta data support (SQLite needs to be compiled with meta data support)], [no]) |
68 | | -AC_MSG_CHECKING([for the --enable-metadata option]) |
69 | | -if test "$enable_metadata" = "yes"; then |
70 | | - HAVE_METADATA=1 |
71 | | - AC_MSG_RESULT([yes]) |
72 | | -else |
73 | | - HAVE_METADATA=0 |
74 | | - AC_MSG_RESULT([no]) |
75 | | -fi |
76 | | - |
77 | | -WXCODE_ARG_ENABLE([codec], [Enables the wxSQLite3 CODEC support (SQLite needs to be compiled with CODEC support)], [no]) |
78 | | -AC_MSG_CHECKING([for the --enable-codec option]) |
79 | | -if test "$enable_codec" = "yes"; then |
80 | | - HAVE_CODEC=1 |
81 | | - AC_MSG_RESULT([yes]) |
82 | | -else |
83 | | - HAVE_CODEC=0 |
84 | | - AC_MSG_RESULT([no]) |
85 | | -fi |
86 | | - |
87 | | -WXCODE_ARG_ENABLE([load_extension], [Enables the wxSQLite3 loadable extension support (SQLite needs to be compiled with loadable extension support)], [no]) |
88 | | -AC_MSG_CHECKING([for the --enable-load-extension option]) |
89 | | -if test "$enable_load_extension" = "yes"; then |
90 | | - HAVE_LOAD_EXTENSION=1 |
91 | | - AC_MSG_RESULT([yes]) |
92 | | -else |
93 | | - HAVE_LOAD_EXTENSION=0 |
94 | | - AC_MSG_RESULT([no]) |
95 | | -fi |
96 | | - |
97 | | -# end in a nice way the configure script |
98 | | -WXCODE_END_PART1 |
99 | | -if test "$USE_DYNAMIC_SQLITE3_LOAD" = "1"; then |
100 | | -echo " - dynamic load enabled" |
101 | | -else |
102 | | -echo " - dynamic load disabled" |
103 | | -fi |
104 | | -if test "$HAVE_METADATA" = "1"; then |
105 | | -echo " - meta data support enabled" |
106 | | -else |
107 | | -echo " - meta data support disabled" |
108 | | -fi |
109 | | -if test "$HAVE_CODEC" = "1"; then |
110 | | -echo " - CODEC support enabled" |
111 | | -else |
112 | | -echo " - CODEC support disabled" |
113 | | -fi |
114 | | -if test "$HAVE_LOAD_EXTENSION" = "1"; then |
115 | | -echo " - loadable extension support enabled" |
116 | | -else |
117 | | -echo " - loadable extension support disabled" |
118 | | -fi |
119 | | -WXCODE_END_PART2 |
120 | | - |
121 | | - |
| 1 | +# ====================================================================================== |
| 2 | +# Author: Francesco Montorsi |
| 3 | +# RCS-ID: $Id: configure.ac,v 1.12 2007/11/10 09:06:31 utelle Exp $ |
| 4 | +# |
| 5 | +# A basic "configure.ac" for a wxCode component. |
| 6 | +# See |
| 7 | +# http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_mono/autoconf.html |
| 8 | +# for more info about autoconf and the autoconf macros. |
| 9 | +# ====================================================================================== |
| 10 | + |
| 11 | +# Init this configure script with basic info about the component |
| 12 | +# (DON'T PUT ANYTHING BEFORE AC_INIT, JUST COMMENTS) |
| 13 | +AC_INIT([wxSqlite3], [3.3.1], [utelle@users.sourceforge.net]) |
| 14 | +AC_CONFIG_AUX_DIR(build) |
| 15 | + |
| 16 | +# ENABLES/DISABLES THE DEBUG MODE FOR THIS CONFIGURE SCRIPT |
| 17 | +#WX_DEBUG_CONFIGURE=1 |
| 18 | + |
| 19 | +# you need the wxCode/build/bakefiles in your local repository to generate a configure |
| 20 | +# script from this configure.ac file since wxcode.m4 is required.... |
| 21 | +m4_include(../wxcode/autoconf/wxcode.m4) |
| 22 | +WXCODE_INIT |
| 23 | + |
| 24 | +## CONFIGURE OPTIONS |
| 25 | +## |
| 26 | +## Before starting checks, declare the options of this configure script |
| 27 | +## Here you should use the AC_ARG_ENABLE and AC_ARG_WITH macros |
| 28 | +## or the wxCode-specific AM_WXCODE_ARG_ENABLE & AM_WXCODE_ARG_WITH macros, |
| 29 | +## to add to this configure script the --enable-XXX and/or --with-XXX |
| 30 | +## options required. If you did not use any <option> tag in your |
| 31 | +## component's bakefile, then you can leave this section as is |
| 32 | +##################################################################### |
| 33 | + |
| 34 | +WXCODE_OPTIONS([debug,unicode,shared,toolkit,wxshared,wxversion]) |
| 35 | + |
| 36 | +AC_ARG_WITH([sqlite3_prefix], |
| 37 | + AC_HELP_STRING([--with-sqlite3-prefix], |
| 38 | + [Prefix where sqlite3 is installed (optional; default is /usr/local)]),, |
| 39 | + [with_sqlite3_prefix=/usr/local]) |
| 40 | +SQLITE3_DIR=$with_sqlite3_prefix |
| 41 | +AC_SUBST(SQLITE3_DIR) |
| 42 | + |
| 43 | + |
| 44 | +## CONFIGURE CHECKS |
| 45 | +## |
| 46 | +## Here you should use the AC_CHECK_LIB, AC_COMPILE_IFELSE, |
| 47 | +## AC_LINK_IFELSE, etc macros to check that the libraries required |
| 48 | +## by your component exist on the host machine and match your |
| 49 | +## required options (version, build settings, etc) |
| 50 | +##################################################################### |
| 51 | + |
| 52 | +# argument 1: here put the minimum required version of wx |
| 53 | +# argument 2: here you must put a comma-separed list of all wx required libraries |
| 54 | +# except for base,core (e.g. "xml,net,adv"); leave empty if you use only core & base |
| 55 | +WXCODE_CHECKS([2.8.0], [core,base,adv]) |
| 56 | + |
| 57 | +WXCODE_ARG_ENABLE([dynamic_load], [Enables the SQLite dynamic load support], [no]) |
| 58 | +AC_MSG_CHECKING([for the --enable-dynamic-load option]) |
| 59 | +if test "$enable_dynamic_load" = "yes"; then |
| 60 | + USE_DYNAMIC_SQLITE3_LOAD=1 |
| 61 | + AC_MSG_RESULT([yes]) |
| 62 | +else |
| 63 | + USE_DYNAMIC_SQLITE3_LOAD=0 |
| 64 | + AC_MSG_RESULT([no]) |
| 65 | +fi |
| 66 | + |
| 67 | +WXCODE_ARG_ENABLE([metadata], [Enables the wxSQLite3 meta data support (SQLite needs to be compiled with meta data support)], [no]) |
| 68 | +AC_MSG_CHECKING([for the --enable-metadata option]) |
| 69 | +if test "$enable_metadata" = "yes"; then |
| 70 | + HAVE_METADATA=1 |
| 71 | + AC_MSG_RESULT([yes]) |
| 72 | +else |
| 73 | + HAVE_METADATA=0 |
| 74 | + AC_MSG_RESULT([no]) |
| 75 | +fi |
| 76 | + |
| 77 | +WXCODE_ARG_ENABLE([codec], [Enables the wxSQLite3 CODEC support (SQLite needs to be compiled with CODEC support)], [no]) |
| 78 | +AC_MSG_CHECKING([for the --enable-codec option]) |
| 79 | +if test "$enable_codec" = "yes"; then |
| 80 | + HAVE_CODEC=1 |
| 81 | + AC_MSG_RESULT([yes]) |
| 82 | +else |
| 83 | + HAVE_CODEC=0 |
| 84 | + AC_MSG_RESULT([no]) |
| 85 | +fi |
| 86 | + |
| 87 | +WXCODE_ARG_ENABLE([load_extension], [Enables the wxSQLite3 loadable extension support (SQLite needs to be compiled with loadable extension support)], [no]) |
| 88 | +AC_MSG_CHECKING([for the --enable-load-extension option]) |
| 89 | +if test "$enable_load_extension" = "yes"; then |
| 90 | + HAVE_LOAD_EXTENSION=1 |
| 91 | + AC_MSG_RESULT([yes]) |
| 92 | +else |
| 93 | + HAVE_LOAD_EXTENSION=0 |
| 94 | + AC_MSG_RESULT([no]) |
| 95 | +fi |
| 96 | + |
| 97 | +# end in a nice way the configure script |
| 98 | +WXCODE_END_PART1 |
| 99 | +if test "$USE_DYNAMIC_SQLITE3_LOAD" = "1"; then |
| 100 | +echo " - dynamic load enabled" |
| 101 | +else |
| 102 | +echo " - dynamic load disabled" |
| 103 | +fi |
| 104 | +if test "$HAVE_METADATA" = "1"; then |
| 105 | +echo " - meta data support enabled" |
| 106 | +else |
| 107 | +echo " - meta data support disabled" |
| 108 | +fi |
| 109 | +if test "$HAVE_CODEC" = "1"; then |
| 110 | +echo " - CODEC support enabled" |
| 111 | +else |
| 112 | +echo " - CODEC support disabled" |
| 113 | +fi |
| 114 | +if test "$HAVE_LOAD_EXTENSION" = "1"; then |
| 115 | +echo " - loadable extension support enabled" |
| 116 | +else |
| 117 | +echo " - loadable extension support disabled" |
| 118 | +fi |
| 119 | +WXCODE_END_PART2 |
| 120 | + |
| 121 | + |
0 commit comments