On Jan 9, 2020, at 6:37 AM, Richard Hipp <[email protected]> wrote:
>
> On 1/9/20, Xingwei Lin <[email protected]> wrote:
>>
>> How can I pass -Dxxx compile option when I build sqlite? Such as, -
>> DSQLITE_ENABLE_INTERNAL_FUNCTIONS.
>
> Option 1:
>
> CFLAGS='-O2 -DSQLITE_ENABLE_INTERNAL_FUNCTIONS' ./configure && make
>
> Option 2:
>
> ./configure && OPTS='-DSQLITE_ENABLE_INTERNAL_FUNCTIONS' make -e
>
> Option 3:
>
> ./configure && make OPTS='-DSQLITE_ENABLE_INTERNAL_FUNCTIONS’
…or the one actually recommended by the Autoconf developers:
./configure CFLAGS='-DSQLITE_ENABLE_INTERNAL_FUNCTIONS'
The reasons for the recommendation have to do with complications that result
from multiple variables, nested Makefile.am, etc.:
https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
I assume SQLite’s Autoconf usage isn’t complicated enough that all of that
applies, but you want to get into the habit of doing it the way that works
across the broadest set of use cases.
Incidentally, this method of overriding CFLAGS and such also works with
Autosetup. See the second example here:
https://msteveb.github.io/autosetup/user/
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users