diff options
author | Schischu <schischu@duckbox> | 2012-06-18 21:13:01 +0200 |
---|---|---|
committer | Cory Fields <theuni-nospam-@xbmc.org> | 2012-07-10 22:47:32 -0400 |
commit | 2d79579adf92fbe53a1b5c148348bed7e5ba21d3 (patch) | |
tree | 643b706bd6c647e343353d8357b32457f4ad7470 /configure.in | |
parent | e7240d7c80636135419338034ad60224ed453bde (diff) |
Allow compiling without mysql dependency (--disable-mysql).
MySQL is heavy and sqlite is the better choice on embedded devices.
Disables also build of cmyth as it depends on mysql.
Diffstat (limited to 'configure.in')
-rwxr-xr-x | configure.in | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/configure.in b/configure.in index 1cb6cb44f9..730b98efa0 100755 --- a/configure.in +++ b/configure.in @@ -381,6 +381,12 @@ AC_ARG_ENABLE([asap-codec], [use_asap=$enableval], [use_asap=no]) +AC_ARG_ENABLE([mysql], + [AS_HELP_STRING([--disable-mysql], + [disable mysql])], + [use_mysql=$enableval], + [use_mysql=yes]) + AC_ARG_ENABLE([webserver], [AS_HELP_STRING([--disable-webserver], [disable webserver])], @@ -731,14 +737,17 @@ else fi # platform common libraries -AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no") -if test $MYSQL_CONFIG = "yes"; then - INCLUDES="$INCLUDES `mysql_config --include`" - MYSQL_LIBS=`mysql_config --libs` - LIBS="$LIBS $MYSQL_LIBS" - AC_SUBST(MYSQL_LIBS) -else - AC_MSG_ERROR($missing_program) +if test "$use_mysql" = "yes"; then + AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no") + if test $MYSQL_CONFIG = "yes"; then + AC_DEFINE([HAVE_MYSQL],[1],["Define to 1 if you have the `mysql' library (-lmysqlclient)."]) + INCLUDES="$INCLUDES `mysql_config --include`" + MYSQL_LIBS=`mysql_config --libs` + LIBS="$LIBS $MYSQL_LIBS" + AC_SUBST(MYSQL_LIBS) + else + AC_MSG_ERROR($missing_program) + fi fi AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library)) AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library)) @@ -777,7 +786,9 @@ AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library)) AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library)) AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library)) AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library)) -AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library)) +if test "$use_mysql" = "yes"; then + AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library)) +fi AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_RESULT([Could not find suitable version of libssh])) AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth])) AC_CHECK_LIB([yajl], [main],, AC_MSG_ERROR($missing_library)) @@ -1878,6 +1889,13 @@ else final_message="$final_message\n ASAP Codec:\tNo" fi +if test "$use_mysql" = "yes"; then + final_message="$final_message\n MySQL:\tYes" + USE_MYSQL=1 +else + final_message="$final_message\n MySQL:\tNo" + USE_MYSQL=0 +fi if test "$use_webserver" = "yes"; then final_message="$final_message\n Webserver:\tYes" USE_WEB_SERVER=1 @@ -2105,6 +2123,7 @@ AC_SUBST(USE_AIRTUNES) AC_SUBST(USE_LIBUDEV) AC_SUBST(USE_LIBUSB) AC_SUBST(USE_LIBCEC) +AC_SUBST(USE_MYSQL) AC_SUBST(USE_WEB_SERVER) |