aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-30 13:54:12 +0200
committerGitHub2016-08-30 13:54:12 +0200
commitbfbfbd3e1a8397cc3b1c9eaff6c7754abe3ddc3d (patch)
tree68851bdc99b78b4b1902944c1df3c3ee5d4f4489 /configure
parent7df744c291e5fcf5dc7afd3b21189c2c56810f8e (diff)
parent368f664c813075f8b8cb2c572dce65f60128eda4 (diff)
downloadscummvm-rg350-bfbfbd3e1a8397cc3b1c9eaff6c7754abe3ddc3d.tar.gz
scummvm-rg350-bfbfbd3e1a8397cc3b1c9eaff6c7754abe3ddc3d.tar.bz2
scummvm-rg350-bfbfbd3e1a8397cc3b1c9eaff6c7754abe3ddc3d.zip
Merge pull request #788 from Tkachov/cloud
ALL: Add Cloud storage support
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure168
1 files changed, 167 insertions, 1 deletions
diff --git a/configure b/configure
index e77351a99d..fb24e1ee4f 100755
--- a/configure
+++ b/configure
@@ -117,6 +117,8 @@ done
#
# Default lib behavior yes/no/auto
_vorbis=auto
+_sdlnet=auto
+_libcurl=auto
_tremor=auto
_tremolo=no
_flac=auto
@@ -153,6 +155,7 @@ _build_hq_scalers=yes
_enable_prof=no
_global_constructors=no
_bink=yes
+_cloud=auto
# Default vkeybd/keymapper/eventrec options
_vkeybd=no
_keymapper=no
@@ -185,9 +188,11 @@ _staticlibpath=
_xcodetoolspath=
_sparklepath=
_sdlconfig=sdl2-config
+_libcurlconfig=curl-config
_freetypeconfig=freetype-config
_sdlpath="$PATH"
_freetypepath="$PATH"
+_libcurlpath="$PATH"
_nasmpath="$PATH"
NASMFLAGS=""
NASM=""
@@ -201,6 +206,7 @@ _have_x86=no
# Add (virtual) features
add_feature 16bit "16bit color" "_16bit"
+add_feature cloud "cloud" "_cloud"
add_feature faad "libfaad" "_faad"
add_feature flac "FLAC" "_flac"
add_feature freetype2 "FreeType2" "_freetype2"
@@ -433,6 +439,41 @@ find_freetypeconfig() {
}
#
+# Determine curl-config
+#
+find_libcurlconfig() {
+ echo_n "Looking for curl-config... "
+ libcurlconfigs="$_libcurlconfig"
+ _libcurlconfig=
+
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
+ for path_dir in $_libcurlpath; do
+ #reset separator to parse sdlconfigs
+ IFS=":"
+ for libcurlconfig in $libcurlconfigs; do
+ if test -f "$path_dir/$libcurlconfig" ; then
+ _libcurlconfig="$path_dir/$libcurlconfig"
+ echo $_libcurlconfig
+ # Save the prefix
+ _libcurlpath=$path_dir
+ if test `basename $path_dir` = bin ; then
+ _sdlpath=`dirname $path_dir`
+ fi
+ # break at first sdl-config found in path
+ break 2
+ fi
+ done
+ done
+
+ IFS="$ac_save_ifs"
+
+ if test -z "$_libcurlconfig"; then
+ echo "none found!"
+ exit 1
+ fi
+}
+
+#
# Determine extension used for executables
#
get_system_exe_extension() {
@@ -922,6 +963,7 @@ Optional Features:
--disable-hq-scalers exclude HQ2x and HQ3x scalers
--disable-translation don't build support for translated messages
--disable-taskbar don't build support for taskbar and launcher integration
+ --disable-cloud don't build cloud support
--enable-vkeybd build virtual keyboard support
--enable-keymapper build key mapper support
--enable-eventrecorder enable event recording functionality
@@ -1004,6 +1046,11 @@ Optional Libraries:
--with-sndio-prefix=DIR Prefix where sndio is installed (optional)
--disable-sndio disable sndio MIDI driver [autodetect]
+ --with-sdlnet-prefix=DIR Prefix where SDL_Net is
+ installed (optional)
+ --disable-sdlnet disable SDL_Net networking library [autodetect]
+ --disable-libcurl disable libcurl networking library [autodetect]
+
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
@@ -1082,6 +1129,12 @@ for ac_option in $@; do
--disable-freetype2) _freetype2=no ;;
--enable-taskbar) _taskbar=yes ;;
--disable-taskbar) _taskbar=no ;;
+ --enable-sdlnet) _sdlnet=yes ;;
+ --disable-sdlnet) _sdlnet=no ;;
+ --enable-libcurl) _libcurl=yes ;;
+ --disable-libcurl) _libcurl=no ;;
+ --enable-cloud) _cloud=yes ;;
+ --disable-cloud) _cloud=no ;;
--enable-updates) _updates=yes ;;
--disable-updates) _updates=no ;;
--enable-libunity) _libunity=yes ;;
@@ -1190,6 +1243,11 @@ for ac_option in $@; do
LIBUNITY_CFLAGS="-I$arg/include"
LIBUNITY_LIBS="-L$arg/lib"
;;
+ --with-sdlnet-prefix=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ SDL_NET_CFLAGS="-I$arg/include"
+ SDL_NET_LIBS="-L$arg/lib"
+ ;;
--backend=*)
_backend=`echo $ac_option | cut -d '=' -f 2`
;;
@@ -4072,6 +4130,110 @@ EOF
esac
#
+# Check for SDL_Net
+#
+echocheck "SDL_Net"
+if test "$_sdlnet" = auto ; then
+ _sdlnet=no
+ cat > $TMPC << EOF
+#include "SDL/SDL_net.h"
+int main(int argc, char *argv[]) { SDLNet_Init(); return 0; }
+EOF
+ cc_check $LIBS $INCLUDES $SDL_NET_CFLAGS $SDL_NET_LIBS -lSDL_net && _sdlnet=yes
+fi
+if test "$_sdlnet" = yes ; then
+ append_var LIBS "$SDL_NET_LIBS -lSDL_net"
+ append_var INCLUDES "$SDL_NET_CFLAGS"
+fi
+define_in_config_if_yes "$_sdlnet" 'USE_SDL_NET'
+echo "$_sdlnet"
+
+#
+# Check for libcurl to be present
+#
+if test "$_libcurl" != "no"; then
+
+ # Look for the curl-config script
+ find_libcurlconfig
+
+ if test -z "$_libcurlconfig"; then
+ _libcurl=no
+ else
+ LIBCURL_LIBS=`$_libcurlconfig --libs`
+ LIBCURL_CFLAGS=`$_libcurlconfig --cflags`
+
+ if test "$_libcurl" = "auto"; then
+ _libcurl=no
+
+ cat > $TMPC << EOF
+ #include <curl/curl.h>
+ int main(int argc, char *argv[]) {
+ int x;
+ curl_easy_setopt(NULL,CURLOPT_URL,NULL);
+ x=CURL_ERROR_SIZE;
+ x=CURLOPT_WRITEFUNCTION;
+ x=CURLOPT_WRITEDATA;
+ x=CURLOPT_ERRORBUFFER;
+ x=CURLOPT_STDERR;
+ x=CURLOPT_VERBOSE;
+
+ curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+ if (data->features & CURL_VERSION_SSL)
+ return 0;
+ return 1;
+ }
+EOF
+
+ cc_check_no_clean $LIBCURL_CFLAGS $LIBCURL_LIBS
+ if test "$?" -eq 0; then
+ $TMPO$HOSTEXEEXT
+ if test "$?" -eq 0; then
+ _libcurl=yes
+ else
+ _libcurl="no SSL support"
+ fi
+ fi
+ cc_check_clean
+ fi
+
+ if test "$_libcurl" = "yes"; then
+ append_var LIBS "$LIBCURL_LIBS"
+ append_var INCLUDES "$LIBCURL_CFLAGS"
+ fi
+ fi
+
+fi
+
+echocheck "libcurl"
+echo "$_libcurl"
+
+define_in_config_if_yes "$_libcurl" "USE_LIBCURL"
+
+#
+# Check whether to build cloud integration support
+#
+echo_n "Cloud integration..."
+if test "$_cloud" = "no"; then
+ echo "no"
+else
+ _cloud=no
+ if test "$_sdlnet" = "yes"; then
+ _cloud=yes
+ echo_n "local"
+ fi
+ if test "$_libcurl" = "yes"; then
+ if test "$_cloud" = "yes"; then echo_n ", "; fi
+ _cloud=yes
+ echo_n "servers"
+ fi
+ if test "$_cloud" = "no"; then
+ echo_n "no"
+ fi
+ echo # newline
+fi
+define_in_config_if_yes $_cloud 'USE_CLOUD'
+
+#
# Check is NSDockTilePlugIn protocol is supported
#
case $_host_os in
@@ -4652,7 +4814,11 @@ if test "$_keymapper" = yes ; then
fi
if test "$_eventrec" = yes ; then
- echo ", event recorder"
+ echo_n ", event recorder"
+fi
+
+if test "$_cloud" = yes ; then
+ echo ", cloud"
else
echo
fi