1 Allow to explicitly disable openssl and mysql
3 AC_ARG_WITH() is being incorrectly used: the third argument indicates
4 the action that needs to be taken when a value was passed, when not
5 the option is enabled. Therefore, the result of the existing code was
6 that when you passed --without-mysql or --without-openssl, the
7 $withval variable would get the value 'yes', which is obviously wrong.
9 Instead, we simply empty this third argument, because $withval is
10 already properly filled with 'yes' or 'no' by the AC_ARG_WITH()
13 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 ===================================================================
23 -AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl], [This will enable HTTPS support in qhttpclient extension API. When it's enabled, user applications will need to link openssl library with -lssl option.])],[withval=yes],[withval=no])
24 +AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl], [This will enable HTTPS support in qhttpclient extension API. When it's enabled, user applications will need to link openssl library with -lssl option.])],[],[withval=no])
25 if test "$withval" = yes; then
26 if test "$with_openssl" = yes; then
27 with_openssl="/usr/include"
32 -AC_ARG_WITH([mysql],[AS_HELP_STRING([--with-mysql], [This will enable MySQL database support in qdatabase extension API. When it's enabled, user applications need to link mysql client library. (ex: -lmysqlclient)])],[withval=yes],[withval=no])
33 +AC_ARG_WITH([mysql],[AS_HELP_STRING([--with-mysql], [This will enable MySQL database support in qdatabase extension API. When it's enabled, user applications need to link mysql client library. (ex: -lmysqlclient)])],[],[withval=no])
34 if test "$withval" = yes; then
35 if test "$with_mysql" = yes; then
36 with_mysql="/usr/include/mysql"