6
6
AC_DEFUN([FC_SDL_CLIENT],
8
if test "$client" = yes; then
9
AC_MSG_WARN([Not checking for SDL; use --enable-client=sdl to enable])
10
elif test "$client" = sdl ; then
8
if test "x$gui_sdl" = "xyes" || test "x$client" = "xall" ||
9
test "x$client" = "xauto" ; then
11
10
AM_PATH_SDL([1.1.4], [sdl_found="yes"], [sdl_found="no"])
12
11
if test "$sdl_found" = yes; then
13
12
ac_save_CPPFLAGS="$CPPFLAGS"
27
26
LIBS="$ac_save_LIBS"
28
27
AC_CHECK_FT2([2.1.3], [freetype_found="yes"],[freetype_found="no"])
29
28
if test "$freetype_found" = yes; then
30
CLIENT_CFLAGS="$SDL_CFLAGS $FT2_CFLAGS"
31
CLIENT_LIBS="-lSDL_image $SDL_LIBS $FT2_LIBS"
32
AC_DEFINE(SDL, 1, [SDL is used])
29
GUI_sdl_CFLAGS="$SDL_CFLAGS $FT2_CFLAGS"
30
GUI_sdl_LIBS="-lSDL_image $SDL_LIBS $FT2_LIBS"
34
elif test "$client" = "sdl"; then
32
elif test "x$gui_sdl" = "xyes"; then
35
33
AC_MSG_ERROR([specified client 'sdl' not configurable (FreeType2 >= 2.1.3 is needed (www.freetype.org))])
37
elif test "$client" = "sdl"; then
35
elif test "x$gui_sdl" = "xyes"; then
38
36
AC_MSG_ERROR([specified client 'sdl' not configurable (SDL_image-devel is needed (www.libsdl.org))])
40
elif test "$client" = "sdl"; then
38
elif test "x$gui_sdl" = "xyes"; then
41
39
AC_MSG_ERROR([specified client 'sdl' not configurable (SDL_image is needed (www.libsdl.org))])
45
43
if test "$found_client" = yes; then
45
if test "x$client" = "xauto" ; then
48
49
dnl Check for libiconv (which is usually included in glibc, but may
49
50
dnl be distributed separately).
52
53
AM_LANGINFO_CODESET
53
CLIENT_LIBS="$LIBICONV $CLIENT_LIBS"
54
GUI_sdl_LIBS="$LIBICONV $GUI_sdl_LIBS"
55
56
dnl Check for some other libraries - needed under BeOS for instance.
56
57
dnl These should perhaps be checked for in all cases?
57
AC_CHECK_LIB(socket, connect, CLIENT_LIBS="-lsocket $CLIENT_LIBS")
58
AC_CHECK_LIB(bind, gethostbyaddr, CLIENT_LIBS="-lbind $CLIENT_LIBS")
58
AC_CHECK_LIB(socket, connect, GUI_sdl_LIBS="-lsocket $GUI_sdl_LIBS")
59
AC_CHECK_LIB(bind, gethostbyaddr, GUI_sdl_LIBS="-lbind $GUI_sdl_LIBS")
60
elif test "$client" = "sdl"; then
61
elif test "x$gui_sdl" = "xyes"; then
61
62
AC_MSG_ERROR([specified client 'sdl' not configurable (SDL >= 1.1.4 is needed (www.libsdl.org))])