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-11-28 22:24:47 +0000
committerStijn Buys <ingar@osirion.org>2008-11-28 22:24:47 +0000
commite93398770ce352e8ad6f9885136855e825bfe776 (patch)
treecda9aa4584429f161b9bc0ddcc2b549514b23759
parent988ed0e44cd4e77eaeaffe5d9faab4e06fa49c66 (diff)
configure.in cleanup
-rw-r--r--configure.in111
1 files changed, 71 insertions, 40 deletions
diff --git a/configure.in b/configure.in
index e008db6..7f2f285 100644
--- a/configure.in
+++ b/configure.in
@@ -145,15 +145,15 @@ if test "x${with_ncurses}" != "xno"; then
AC_CHECK_HEADER(ncurses.h,
HAVE_CURSES=ncurses
- AC_DEFINE(HAVE_CURSES, 1, [Define this if you have the curses library])
+ AC_DEFINE_UNQUOTED(HAVE_CURSES, 1, [Define this if you have the curses library])
CURSES_LIBS="$NCURSES_LIBS -lncurses",
HAVE_CURSES=no
)
if test "x${HAVE_CURSES}" = "xno"; then
AC_CHECK_HEADER(curses.h,
- HAVE_CURSES=pdcurses
- AC_DEFINE(HAVE_CURSES, 1, [Define this if you have the curses library])
+ HAVE_CURSES=curses
+ AC_DEFINE_UNQUOTED(HAVE_CURSES, 1, [Define this if you have the curses library])
CURSES_LIBS="$NCURSES_LIBS -lpdcurses",
HAVE_CURSES=no
)
@@ -165,6 +165,20 @@ AC_SUBST(CURSES_CFLAGS)
AC_SUBST(CURSES_LIBS)
dnl ----------------------------------------------------------------
+dnl check for ncurses
+dnl
+
+AC_CHECK_HEADER(zlib.h,
+ [],
+ AC_MSG_ERROR([zlib.h not found])
+)
+
+AC_CHECK_LIB(z, compress,
+ [],
+ AC_MSG_ERROR([zlib not found])
+)
+
+dnl ----------------------------------------------------------------
dnl build client and server or dedicated server only
dnl
BUILD_CLIENT=no
@@ -182,70 +196,84 @@ if test "x${with_client}" = xno; then
else
AC_MSG_RESULT(yes)
- BUILD_CLIENT=yes
- AC_DEFINE(BUILD_CLIENT, 1, [Define this to build a client])
-
+ dnl ---------------------------------------------------------------
+ dnl OpenGL
+ dnl
+
AC_CHECK_HEADER(GL/gl.h,
- HAVE_OPENGL=yes
- AC_DEFINE(HAVE_OPENGL, 1, [Define this if you have OpenGL]),
- AC_MSG_ERROR([OpenGL include file GL/gl.h not found])
+ [],
+ [AC_MSG_ERROR([GL/gl.h not found])]
)
AC_CHECK_HEADER(GL/glu.h,
- HAVE_OPENGL_GLU=yes
- AC_DEFINE(HAVE_OPENGL_GLU, 1, [Define this if you have GLU]),
- AC_MSG_ERROR([OpenGL include file GL/glu.h not found])
+ [],
+ [AC_MSG_ERROR([GL/glu.h not found])]
)
GL_LIBS="$HOST_GL_LIBS"
-
AC_SUBST(GL_LIBS)
AC_SUBST(GL_CFLAGS)
- AC_CHECK_HEADER(png.h,
- HAVE_LIBPNG=yes
- AC_DEFINE(HAVE_LIBPNG, 1, [Define this if you have libpng]),
- AC_MSG_ERROR([libpng include file png.h not found])
+ dnl ---------------------------------------------------------------
+ dnl OpenAL
+
+ AC_CHECK_HEADER(AL/al.h,
+ [],
+ [AC_MSG_ERROR([AL/al.h not found])]
)
- LIBPNG_LIBS="-lpng12"
+ AL_LIBS="$HOST_AL_LIBS"
+ AC_SUBST(AL_LIBS)
+
+ dnl ---------------------------------------------------------------
+ dnl libpng
+ dnl
+
+ AC_CHECK_HEADER(png.h,
+ [],
+ [AC_MSG_ERROR([png.h not found])]
+ )
+ AC_CHECK_LIB(png, png_create_info_struct,
+ HAVE_LIBPNG=yes,
+ [AC_MSG_ERROR([libpng not found])]
+ )
+
+ LIBPNG_LIBS="-lpng"
AC_SUBST(LIBPNG_LIBS)
+ dnl ---------------------------------------------------------------
+ dnl libjpeg
+ dnl
+
AC_CHECK_HEADER(jpeglib.h,
+ [],
+ [AC_MSG_ERROR([jpeglib.h not found])]
+ )
+ AC_CHECK_LIB(jpeg, jpeg_start_decompress,
HAVE_LIBJPEG=yes
- AC_DEFINE(HAVE_LIBJPEG, 1, [Define this if you have libjpeg]),
- AC_MSG_ERROR([libjpeg include file jpeglib.h not found])
+ AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define this if you have libjpeg]),
+ AC_MSG_ERROR([libjpeg not found])
)
LIBJPG_LIBS="-ljpeg"
AC_SUBST(LIBJPG_LIBS)
- AC_CHECK_HEADER(AL/al.h,
- HAVE_OPENGL=yes
- AC_DEFINE(HAVE_OPENAL, 1, [Define this if you have OpenAL]),
- AC_MSG_ERROR([OpenAL include file AL/al.h not found])
- )
-
- AL_LIBS="$HOST_AL_LIBS"
- AC_SUBST(AL_LIBS)
-
AC_MSG_CHECKING([looking for SDL])
KDE_FIND_PATH(sdl-config, LIBSDL_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
AC_MSG_ERROR([SDL not found])
])
if test -n "$LIBSDL_CONFIG"; then
- LIBSDL_LIBS="`$LIBSDL_CONFIG --libs`"
- LIBSDL_RPATH=
- for args in $LIBSDL_LIBS; do
+ LIBSDL_LIBS="`$LIBSDL_CONFIG --libs`"
+ LIBSDL_RPATH=
+ for args in $LIBSDL_LIBS; do
case $args in
- -L*)
- LIBSDL_RPATH="$LIBSDL_RPATH $args"
- ;;
+ -L*)
+ LIBSDL_RPATH="$LIBSDL_RPATH $args"
+ ;;
esac
- done
- LIBSDL_RPATH=`echo $LIBSDL_RPATH | sed -e "s/-L/-R/g"`
- LIBSDL_CFLAGS="`$LIBSDL_CONFIG --cflags`"
+ done
- AC_DEFINE_UNQUOTED(HAVE_LIBSDL, 1, [Defines if your system has the LIBSDL library])
+ LIBSDL_RPATH=`echo $LIBSDL_RPATH | sed -e "s/-L/-R/g"`
+ LIBSDL_CFLAGS="`$LIBSDL_CONFIG --cflags`"
fi
AC_MSG_RESULT($HAVE_LIBSDL)
@@ -253,6 +281,9 @@ else
AC_SUBST(LIBSDL_LIBS)
AC_SUBST(LIBSDL_CFLAGS)
AC_SUBST(LIBSDL_RPATH)
+
+ BUILD_CLIENT=yes
+ AC_DEFINE_UNQUOTED(BUILD_CLIENT, 1, [Define this to build the client])
fi
CXXFLAGS="-pipe $DEBUG_CFLAGS $WARN_CFLAGS $CXXFLAGS"
@@ -286,7 +317,7 @@ fi
PACKAGE_DATADIR="$pkgdatadir/data"
-AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, "$PACKAGE_DATADIR",
+AC_DEFINE(PACKAGE_DATADIR, "$PACKAGE_DATADIR",
[Define this to the path containing the game data.]
)