Changeset 582

Show
Ignore:
Timestamp:
09/28/07 09:22:29 (1 year ago)
Author:
takkaria
Message:

Fix up autoconf support somewhat.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk

    • Property bzr:revision-id:v3-trunk0 changed from
      513 me@rephial.org-20070928112818-0w6plp46k8exdip2
      514 me@rephial.org-20070928131758-pxco2ac4w19dsz9n
      to
      513 me@rephial.org-20070928002737-5msple19r3ahxzdz
    • Property bzr:revision-info changed from
      timestamp: 2007-09-28 14:17:58.954999924 +0100
      committer: Andrew Sidwell <me@rephial.org>
      properties:
      branch-nick: 263-radius
      to
      timestamp: 2007-09-28 01:27:37.368000031 +0100
      committer: Andrew Sidwell <me@rephial.org>
      properties:
      branch-nick: 365-autoconf
  • trunk/configure.ac

    r548 r582  
    1111AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 
    1212AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]) 
     13 
     14AC_ARG_WITH(setgid,       [  --with-setgid=NAME      install angband as group NAME]) 
     15AC_ARG_WITH(private_dirs, [  --with-private-dirs     use private scorefiles/savefiles/datafiles]) 
     16AC_ARG_WITH(noinstall,    [  --with-noinstall        don't install globally at all]) 
     17 
     18if test "x$with_setgid" != "xyes"; then 
     19        if test "x$with_setgid" != "x"; then 
     20                wsetgid=yes 
     21        fi 
     22fi 
     23 
     24if test "x$wsetgid$with_private_dirs$with_noinstall" != "xyes";  then 
     25 
     26        echo "Please run ./configure with one of: 
     27 
     28--with-setgid=<groupname> 
     29    This configures the game to store savefiles and scorefiles in a central 
     30    location on the system, writeable only by the group \"groupname\".  If you 
     31    want a traditional installation of Angband, where all users share a 
     32    scorefile, then use this option, and set the groupname to your \"games\" 
     33    group.  This option requires the game to have the \"setgid\" bit set on its 
     34    permissions, and thus this option requires root when installing. 
     35 
     36--with-private-dirs 
     37    This configures the game to store savefiles and scorefiles for each user 
     38    in that user's home directory.  The game requires no special privileges if 
     39    you do this, and should be used for most installations of the game. 
     40 
     41--with-noinstall 
     42    This configures the game to store savefiles and scorefiles in the "lib" 
     43    directory that the game uses.  This is useful if you don't want to install 
     44    system-wide at all; \"make install\" will just move the executable to the 
     45    directory above \"src\" if you choose this option.  This option is 
     46    recommended for developers. 
     47" 
     48 
     49        AC_MSG_ERROR([Please specify an installation method.]) 
     50fi 
     51 
    1352 
    1453dnl Check for C compiler 
     
    2766AC_PATH_PROG(CP, cp) 
    2867 
    29 dnl Work around an autoconf bugs
     68dnl Work around an autoconf bug
    3069if test "$prefix" = "NONE"; then 
    3170        prefix="${ac_default_prefix}" 
     
    3372 
    3473 
    35 AC_ARG_WITH(setgid,  [  --with-setgid=NAME      install angband as group NAME]) 
     74 
     75if test "x$with_private_dirs" != "x"; then 
     76        AC_DEFINE(USE_PRIVATE_PATHS, 1, [Define to use private user paths.]) 
     77fi 
     78 
    3679AC_ARG_WITH(libpath, [  --with-libpath=PATH     use PATH as the path to the Angband lib folder]) 
    3780 
    3881if test "$with_libpath" != ""; then 
    3982        libpath="${with_libpath}" 
    40 elif test "$with_setgid" != ""; then 
    41         libpath="${prefix}/share/${PACKAGE}/" 
    42 else 
     83elif test "$with_noinstall" != ""; then 
    4384        libpath="./lib/" 
    4485        bindir=".." 
     86else 
     87        libpath="${prefix}/share/${PACKAGE}/" 
    4588fi 
    4689 
     
    5295AC_DEFINE_UNQUOTED([DEFAULT_PATH], "${game_datadir}", [Path to the game's lib directory]) 
    5396 
    54 SETEGID="$with_setgid";    AC_SUBST(SETEGID
    55 DATA_PATH="$game_datadir"; AC_SUBST(DATA_PATH
    56  
     97NOINSTALL="$with_noinstall"; AC_SUBST(NOINSTALL
     98SETEGID="$with_setgid";      AC_SUBST(SETEGID
     99DATA_PATH="$game_datadir";   AC_SUBST(DATA_PATH) 
    57100 
    58101dnl Frontends 
    59102AC_ARG_ENABLE(gtk, 
    60         [  --enable-gtk                         Enables GTK 2.x frontend, can't use on system-wide installs (default: disabled)], 
     103        [AS_HELP_STRING([--enable-gtk],       [Enables GTK 2.x frontend (default: disabled)])], 
    61104        [enable_gtk=$enableval], 
    62105        [enable_gtk=no]) 
    63106AC_ARG_ENABLE(curses, 
    64         [  --enable-curses                      Enables Curses frontend (default: enabled)], 
     107        [AS_HELP_STRING([--enable-curses],    [Enables Curses frontend (default: enabled)])], 
    65108        [enable_curses=$enableval], 
    66109        [enable_curses=yes]) 
    67110AC_ARG_ENABLE(x11, 
    68         [  --enable-x11                         Enables X11 frontend (default: enabled)], 
     111        [AS_HELP_STRING([--enable-x11],       [Enables X11 frontend (default: enabled)])], 
    69112        [enable_x11=$enableval], 
    70113        [enable_x11=yes]) 
    71114AC_ARG_ENABLE(sdl, 
    72         [  --enable-sdl                         Enables SDL frontend (default: disabled)], 
     115        [AS_HELP_STRING([--enable-sdl],       [Enables SDL frontend (default: disabled)])], 
    73116        [enable_sdl=$enableval], 
    74117        [enable_sdl=no]) 
     
    76119dnl Sound modules 
    77120AC_ARG_ENABLE(sdl_mixer, 
    78         [  --enable-sdl-mixer                   Enables SDL mixer sound support (default: enabled)], 
     121        [AS_HELP_STRING([--enable-sdl-mixer], [Enables SDL mixer sound support (default: enabled)])], 
    79122        [enable_sdl_mixer=$enable_sdl_mixer], 
    80123        [enable_sdl_mixer=yes]) 
    81124 
    82125 
     126if test "x$enable_gtk$with_setgid" != "xyes"; then 
     127        AC_MSG_ERROR([The "setgid" option and the GTK port are incompatible.]) 
     128fi 
    83129 
    84130 
  • trunk/lib/data/Makefile

    r281 r582  
    2828                        touch ${DATA_PATH}/data/prices.raw; \ 
    2929                        touch ${DATA_PATH}/data/shop_own.raw; \ 
     30                        touch ${DATA_PATH}/data/spells.raw; \ 
    3031                        touch ${DATA_PATH}/data/terrain.raw; \ 
    3132                        touch ${DATA_PATH}/data/vault.raw; \ 
  • trunk/mk/objective.mk

    r399 r582  
    3131        fi 
    3232        @if [ "x$(OBJECTIVE_DATA)" != "x" ]; then \ 
    33          if [ "x$(SETEGID)" != "x" ]; then \ 
     33         if [ "x$(NOINSTALL)" = "x" ]; then \ 
    3434                for i in $(OBJECTIVE_DATA); do \ 
    3535                        source=`echo $$i | cut -d ":" -f1`; \ 
  • trunk/src/Makefile

    r399 r582  
    2525                if [ "x$(DRY)" = "x" ]; then \ 
    2626                        chown root:${SETEGID} $(DESTDIR)$(BINDIR)/angband; \ 
     27                        chmod g+s $(DESTDIR)$(BINDIR)/angband; \ 
    2728                fi; \ 
    2829        fi