Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-08-01 19:57:03 +0000
committerStijn Buys <ingar@osirion.org>2008-08-01 19:57:03 +0000
commit089cb5f96e400d4ab7c9d8041cb51eb8f118d9c1 (patch)
tree9799137f41d5104ed4911ac5774f9f50406581d9 /configure.in
parentcc335cfbf13a6b21c5f65febc6049eb5d4c16b63 (diff)
initial make install support
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in49
1 files changed, 29 insertions, 20 deletions
diff --git a/configure.in b/configure.in
index d0b75ff..1a6aee7 100644
--- a/configure.in
+++ b/configure.in
@@ -82,6 +82,7 @@ case "$host" in
HOST_AL_LIBS="-lOpenAL32"
ICON_CLIENT="osirion-res.o"
ICON_SERVER="osiriond-res.o"
+ INSTALLTYPE="single directory"
AC_MSG_RESULT(win32)
;;
*)
@@ -90,6 +91,7 @@ case "$host" in
HOST_AL_LIBS="-lopenal"
ICON_CLIENT=""
ICON_SERVER=""
+ INSTALLTYPE="standard"
AC_MSG_RESULT(generic unix)
;;
esac
@@ -234,29 +236,35 @@ AC_SUBST(CXXFLAGS)
dnl ---------------------------------------------------------------
dnl Installation paths
-test "$prefix" = "NONE" && prefix="/opt/games/$PACKAGE"
-
-PACKAGE_PREFIX="$prefix"
-PACKAGE_BINDIR="$prefix/bin"
-PACKAGE_DATADIR="$prefix/data"
-PACKAGE_LIBDIR="$prefix/lib"
-
-AC_DEFINE_UNQUOTED(PACKAGE_PREFIX, "$PACKAGE_PREFIX",
- [Define this to the path where the game will be installed.]
+AC_MSG_CHECKING(installation type)
+AC_ARG_ENABLE(single_directory,
+ AC_HELP_STRING(
+ [--enable-single-directory], [install everything in a single directory]
+ ),
+ AC_MSG_RESULT(single directory)
+ INSTALLTYPE="single directory",
+ AC_MSG_RESULT(standard)
+ INSTALLTYPE="standard"
)
-AC_DEFINE_UNQUOTED(PACKAGE_BINDIR, "$PACKAGE_BINDIR",
- [Define this to the path containing the game binaries.]
-)
+if test "x${INSTALLTYPE}" = xstandard; then
+ test "$prefix" = "NONE" && prefix="/usr/local"
+ bindir="$prefix/bin"
+ pkgdatadir="$prefix/share/${PACKAGE}"
+ docdir="$pkgdatadir/doc"
+else
+ test "$prefix" = "NONE" && prefix="/opt/games/$PACKAGE"
+ bindir="$prefix"
+ pkgdatadir="$prefix"
+ docdir="$prefix/doc"
+fi
+
+PACKAGE_DATADIR="$pkgdatadir/data"
AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, "$PACKAGE_DATADIR",
[Define this to the path containing the game data.]
)
-AC_DEFINE_UNQUOTED(PACKAGE_LIBDIR, "$PACKAGE_LIBDIR",
- [Define this to the path containing the game libraries.]
-)
-
dnl ---------------------------------------------------------------
dnl Write makefiles and config.h
@@ -283,9 +291,10 @@ Configuration summary:
openal ............. $AL_LIBS
Installation directories:
- prefix ............. $PACKAGE_PREFIX
- binaries ........... $PACKAGE_BINDIR
- libraries .......... $PACKAGE_LIBDIR
- data ............... $PACKAGE_DATADIR
+ installation type .. $INSTALLTYPE
+ prefix ............. $prefix
+ binaries ........... $bindir
+ documentation ...... $docdir
+ game data .......... $PACKAGE_DATADIR
])