Changeset 167

Show
Ignore:
Timestamp:
06/08/07 14:03:42 (3 years ago)
Author:
takkaria
Message:

Fix automake handling of SDL and everything; works on Linux again now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure.ac

    r159 r167  
    7575        [enable_gtk=no]) 
    7676AC_ARG_ENABLE(curses, 
    77         [  --enable-curses                      Enables Curses frontend (default: enabled)], 
     77        [  --enable-curses                      Enables Curses frontend], 
    7878        [enable_curses=$enableval], 
    7979        [enable_curses=yes]) 
    8080AC_ARG_ENABLE(x11, 
    81         [  --enable-x11                         Enables X11 frontend (default: disabled)], 
     81        [  --enable-x11                         Enables X11 frontend], 
    8282        [enable_x11=$enableval], 
    83         [enable_x11=no]) 
     83        [enable_x11=yes]) 
    8484AC_ARG_ENABLE(sdl, 
    85         [  --enable-sdl                         Enables SDL frontend (default: disabled)], 
     85        [  --enable-sdl                         Enables SDL frontend], 
    8686        [enable_sdl=$enableval], 
    87         [enable_sdl=no]) 
     87        [enable_sdl=yes]) 
    8888 
    8989dnl Sound modules 
     
    130130dnl X11 checking 
    131131if test "$enable_x11" = "yes"; then 
    132         AC_PATH_X 
    133         if test "$x_libraries" = "no"; then 
     132        AC_PATH_XTRA 
     133 
     134        if test "$X_DISPLAY_MISSING" != ""; then 
    134135                AC_DEFINE(USE_X11, 0, [Define to 1 if using the X11 frontend and X11 libraries are found.]) 
    135136                with_x11=no 
    136137        else 
    137138                AC_DEFINE(USE_X11, 1, [Define to 1 if using the X11 frontend and X11 libraries are found.]) 
    138                 CFLAGS+=" -I/usr/X11R6/include -I/usr/include
    139                 LDFLAGS+=" $x_libraries
     139                CFLAGS="$CFLAGS $X_CFLAGS
     140                LDFLAGS="$LDFLAGS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS
    140141                with_x11=yes 
    141142        fi 
     
    145146if test "$enable_sdl" = "yes"; then 
    146147        AM_PATH_SDL(1.2.0,,) 
    147         AC_CHECK_HEADERS([SDL/SDL_ttf.h]) 
     148 
    148149        if test "$SDL_CONFIG" = "no"; then 
    149150                with_sdl=no 
    150151                AC_DEFINE(USE_SDL, 0, [Define to 1 if using the SDL interface and SDL & SDL_ttf are found.]) 
    151152        else 
    152                 AC_DEFINE(USE_SDL, 1, [Define to 1 if using the SDL interface and SDL & SDL_ttf are found.]) 
    153                 CFLAGS="${CFLAGS} $SDL_CFLAGS" 
    154                 LDFLAGS="${LDFLAGS} $SDL_LIBS" 
    155                 with_sdl=yes 
     153                AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW, sdl_image=yes, sdl_image=no) 
     154                AC_CHECK_LIB(SDL_ttf, TTF_Init, sdl_ttf=yes, sdl_ttf=no) 
     155 
     156                if test "$sdl_image" = "yes"; then 
     157                if test "$sdl_ttf" = "yes"; then 
     158                        AC_DEFINE(USE_SDL, 1, [Define to 1 if using the SDL interface and SDL is found.]) 
     159                        CFLAGS="${CFLAGS} ${SDL_CFLAGS}" 
     160                        LDFLAGS="${LDFLAGS} ${SDL_LIBS} -lSDL_image -lSDL_ttf" 
     161                        with_sdl=yes 
     162                fi; fi 
    156163        fi 
    157164fi 
     
    203210dnl Check for functions. 
    204211AC_FUNC_STAT 
    205 AC_FUNC_SELECT_ARGTYPES 
    206 AC_CHECK_FUNCS([memmove memset strrchr mkdir strtol mkstemp setegid can_change_color]) 
     212AC_CHECK_FUNCS([memmove memset mkdir strtol mkstemp setegid can_change_color]) 
    207213 
    208214dnl XXX: Work around some autoconf bugs. 
  • trunk/src/autoconf.h.in

    r159 r167  
    3434#undef HAVE_MKSTEMP 
    3535 
    36 /* Define to 1 if you have the <SDL/SDL_ttf.h> header file. */ 
    37 #undef HAVE_SDL_SDL_TTF_H 
    38  
    3936/* Define to 1 if you have the `setegid' function. */ 
    4037#undef HAVE_SETEGID 
     
    5653#undef HAVE_STRING_H 
    5754 
    58 /* Define to 1 if you have the `strrchr' function. */ 
    59 #undef HAVE_STRRCHR 
    60  
    6155/* Define to 1 if you have the `strtol' function. */ 
    6256#undef HAVE_STRTOL 
    63  
    64 /* Define to 1 if you have the <sys/select.h> header file. */ 
    65 #undef HAVE_SYS_SELECT_H 
    66  
    67 /* Define to 1 if you have the <sys/socket.h> header file. */ 
    68 #undef HAVE_SYS_SOCKET_H 
    6957 
    7058/* Define to 1 if you have the <sys/stat.h> header file. */ 
     
    11199#undef SDL_SOUND 
    112100 
    113 /* Define to the type of arg 1 for `select'. */ 
    114 #undef SELECT_TYPE_ARG1 
    115  
    116 /* Define to the type of args 2, 3 and 4 for `select'. */ 
    117 #undef SELECT_TYPE_ARG234 
    118  
    119 /* Define to the type of arg 5 for `select'. */ 
    120 #undef SELECT_TYPE_ARG5 
    121  
    122101/* Define to 1 if you have the ANSI C header files. */ 
    123102#undef STDC_HEADERS 
     
    141120#undef USE_NCURSES 
    142121 
    143 /* Define to 1 if using the SDL interface and SDL & SDL_ttf are found. */ 
     122/* Define to 1 if using the SDL interface and SDL is found. */ 
    144123#undef USE_SDL 
    145124 
     
    153132   first (like Motorola and SPARC, unlike Intel and VAX). */ 
    154133#undef WORDS_BIGENDIAN 
     134 
     135/* Define to 1 if the X Window System is missing or not being used. */ 
     136#undef X_DISPLAY_MISSING