Ignore:
Timestamp:
May 9, 2011, 12:55:14 AM (11 years ago)
Author:
Sam Hocevar
Message:

build: add a `--with-assetsdir' configure flag to specify where the
game data should be installed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/configure.ac

    r610 r614  
    2020fi
    2121
    22 dnl Figure out where the datafiles will be
    23 EXPDATADIR="-DEXPDATADIR=\\\"$datadir/games/abuse\\\""
    24 AC_SUBST(EXPDATADIR)
    25 
    2622AC_ARG_ENABLE(debug,
    2723  [  --enable-debug          build debug versions of the game (default no)])
     
    3127  [  --disable-nonfree       disable non-free data (default no)])
    3228
    33 dnl Checks for libraries
     29AC_ARG_WITH(assetsdir,
     30  [  --with-assetsdir=DIR    override default game data directory])
     31
     32dnl  Figure out where the datafiles will be
     33if test "x${with_assetsdir}" = x; then
     34  with_assetsdir='$(datadir)/games/abuse'
     35fi
     36AC_SUBST([assetsdir], [$with_assetsdir])
     37
     38dnl  Checks for libraries
    3439dnl Do we need to link against something for X shared memory support?
    35 AC_CHECK_LIB(Xext,XShmAttach,:,[
    36 AC_CHECK_LIB(XextSam,XShmAttach,LIBS="$LIBS -lXextSam",,$X_LIBS -lX11 -lXext)
    37 ],$X_LIBS -lX11)
     40AC_CHECK_LIB(Xext, XShmAttach, :,
     41             [AC_CHECK_LIB(XextSam, XShmAttach, LIBS="$LIBS -lXextSam", :,
     42                           $X_LIBS -lX11 -lXext)],
     43             $X_LIBS -lX11)
    3844
    3945dnl Checks for Solaris compatibility
    40 AC_CHECK_LIB(m,pow,LIBS="$LIBS -lm")
    41 AC_CHECK_LIB(socket,socket,LIBS="$LIBS -lsocket")
    42 AC_CHECK_LIB(nsl,gethostbyname,LIBS="$LIBS -lnsl")
     46AC_CHECK_LIB(m, pow, LIBS="$LIBS -lm")
     47AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
     48AC_CHECK_LIB(nsl, gethostbyname, LIBS="$LIBS -lnsl")
    4349
    4450dnl Check for SDL
     
    114120    #else
    115121    #include <GL/gl.h>
    116     #endif
    117 ],[
    118 ],[
    119 have_opengl=yes
    120 ])
     122    #endif],
     123  [],
     124  [have_opengl=yes])
    121125AC_MSG_RESULT($have_opengl)
    122 if test x$have_opengl = xyes; then
     126if test "x$have_opengl" = xyes; then
    123127    CFLAGS="$CFLAGS -DHAVE_OPENGL"
    124128    CXXFLAGS="$CXXFLAGS -DHAVE_OPENGL"
     
    140144echo "
    141145------ Configuration for $PACKAGE $VERSION ------
    142     Compiler:         ${CC} (version `${CC} --version`)
    143     Install prefix:   $prefix
    144     SDL version:      `sdl-config --version`
    145     OpenGL support:   $have_opengl
     146    Compiler:          ${CC} (`${CC} --version | head -n 1`)
     147    Install prefix:    ${prefix}
     148    Assets directory:  ${with_assetsdir}
     149    SDL version:       `sdl-config --version`
     150    OpenGL support:    ${have_opengl}
    146151
    147152Now type 'make' to build $PACKAGE.
Note: See TracChangeset for help on using the changeset viewer.