mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 04:35:16 +00:00
CONFIGURE: Add ENet library.
This commit is contained in:
parent
f40455c74c
commit
ade9fab8d6
@ -211,6 +211,9 @@ const char gScummVMFeatures[] = ""
|
||||
"SDL_net "
|
||||
#endif
|
||||
#endif
|
||||
#ifdef USE_ENET
|
||||
"ENet "
|
||||
#endif
|
||||
#ifdef USE_TINYGL
|
||||
"TinyGL "
|
||||
#endif
|
||||
|
34
configure
vendored
34
configure
vendored
@ -138,6 +138,7 @@ _ogg=auto
|
||||
_vorbis=auto
|
||||
_sdlnet=auto
|
||||
_libcurl=auto
|
||||
_enet=auto
|
||||
_tremor=auto
|
||||
_tremolo=no
|
||||
_flac=auto
|
||||
@ -1052,6 +1053,9 @@ Optional Libraries:
|
||||
--with-libcurl-prefix=DIR prefix where libcurl is installed (optional)
|
||||
--disable-libcurl disable libcurl networking library [autodetect]
|
||||
|
||||
--with-enet-prefix=DIR prefix where ENet is installed (optional)
|
||||
--disable-enet disable ENet networking library [autodetect]
|
||||
|
||||
--with-discord-prefix=DIR prefix where discord-rpc is installed (optional)
|
||||
--disable-discord disable Discord rich presence integration [autodetect]
|
||||
|
||||
@ -1189,6 +1193,8 @@ for ac_option in $@; do
|
||||
--disable-sdlnet) _sdlnet=no ;;
|
||||
--enable-libcurl) _libcurl=yes ;;
|
||||
--disable-libcurl) _libcurl=no ;;
|
||||
--enable-enet) _enet=yes ;;
|
||||
--disable-enet) _enet=no ;;
|
||||
--enable-cloud) _cloud=yes ;;
|
||||
--disable-cloud) _cloud=no ;;
|
||||
--enable-lld) _lld=yes ;;
|
||||
@ -1367,6 +1373,11 @@ for ac_option in $@; do
|
||||
SDL_NET_CFLAGS="-I$arg/include"
|
||||
SDL_NET_LIBS="-L$arg/lib"
|
||||
;;
|
||||
--with-enet-prefix=*)
|
||||
arg=`echo $ac_option | cut -d '=' -f 2`
|
||||
ENET_CFLAGS="-I$arg/include"
|
||||
ENET_LIBS="-L$arg/lib"
|
||||
;;
|
||||
--with-opengl-prefix=*)
|
||||
arg=`echo $ac_option | cut -d '=' -f 2`
|
||||
OPENGL_CFLAGS="-I$arg/include"
|
||||
@ -4174,6 +4185,29 @@ EOF
|
||||
echo "$_sdlnet"
|
||||
fi
|
||||
|
||||
if test "$_enet" = auto ; then
|
||||
if test "$_pkg_config" = "yes" && $_pkgconfig --exists libenet; then
|
||||
append_var ENET_LIBS "`$_pkgconfig --libs libenet`"
|
||||
append_var ENET_CFLAGS "`$_pkgconfig --cflags libenet`"
|
||||
else
|
||||
append_var ENET_LIBS "-lenet"
|
||||
fi
|
||||
|
||||
# Check for ENet
|
||||
echocheck "ENet"
|
||||
_enet=no
|
||||
cat > $TMPC << EOF
|
||||
#include <enet/enet.h>
|
||||
int main(int argc, char *argv[]) { enet_initialize(); return 0; }
|
||||
EOF
|
||||
cc_check $ENET_LIBS $LIBS $INCLUDES $ENET_CFLAGS && _enet=yes
|
||||
if test "$_enet" = yes ; then
|
||||
append_var LIBS "$ENET_LIBS"
|
||||
append_var INCLUDES "$ENET_CFLAGS"
|
||||
fi
|
||||
define_in_config_if_yes "$_enet" 'USE_ENET'
|
||||
echo "$_enet"
|
||||
fi
|
||||
|
||||
#
|
||||
# Enable 16bit support only for backends which support it
|
||||
|
Loading…
x
Reference in New Issue
Block a user