~ubuntu-branches/ubuntu/natty/freeciv/natty-proposed

« back to all changes in this revision

Viewing changes to m4/sdl-client.m4

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams, Karl Goetz, Clint Adams
  • Date: 2010-02-23 22:09:02 UTC
  • mfrom: (7.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100223220902-s3spqi1x4e190y0t
Tags: 2.2.0-1
[ Karl Goetz ]
* Remove civserver files in /etc/ggzd/ (Closes: 523772, 517787)
* Adding ${misc:Depends} to all binary packages (lintian warnings)

[ Clint Adams ]
* New upstream version.
  - Drop data_dsc_use_bindir.diff (binary pathnames have changed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
AC_DEFUN([FC_SDL_CLIENT],
7
7
[
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"
33
31
            found_client=yes
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))])
36
34
          fi    
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))])
39
37
        fi
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))])
42
40
      fi
43
41
    fi
44
42
 
45
43
    if test "$found_client" = yes; then
46
 
      client=sdl
 
44
      gui_sdl=yes
 
45
      if test "x$client" = "xauto" ; then
 
46
        client=yes
 
47
      fi
47
48
 
48
49
      dnl Check for libiconv (which is usually included in glibc, but may
49
50
      dnl be distributed separately).
50
51
      AM_ICONV
51
52
      AM_LIBCHARSET
52
53
      AM_LANGINFO_CODESET
53
 
      CLIENT_LIBS="$LIBICONV $CLIENT_LIBS"
 
54
      GUI_sdl_LIBS="$LIBICONV $GUI_sdl_LIBS"
54
55
 
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")
59
60
 
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))])
62
63
    fi
63
64
  fi