summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-01-06 17:00:25 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-01-06 17:00:25 +0100
commit791ec19aa351df7d5d1ecc3bc6007ba512c05488 (patch)
treeab17df5c3d67389d0dc08733570edeeb7a9c9999 /configure.ac
parent6b60673b0805fbab747924d1a0b6d9c66fc96f64 (diff)
parented39006cfe36e01f68d13a59d1109db905997efc (diff)
downloadmana-client-791ec19aa351df7d5d1ecc3bc6007ba512c05488.tar.gz
mana-client-791ec19aa351df7d5d1ecc3bc6007ba512c05488.tar.bz2
mana-client-791ec19aa351df7d5d1ecc3bc6007ba512c05488.tar.xz
mana-client-791ec19aa351df7d5d1ecc3bc6007ba512c05488.zip
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac77
1 files changed, 41 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac
index 791a84c5..8c1ce8a4 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,18 +1,15 @@
AC_PREREQ(2.59)
AC_INIT([The Mana World], [0.0.27], [themanaworld-devel@lists.sourceforge.net], [tmw])
+AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h:config.h.in])
AC_LANG_CPLUSPLUS
# Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL
-AC_PROG_MAKE_SET
# Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STDBOOL
-AC_C_CONST
AC_HEADER_TIME
-AC_C_VOLATILE
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
@@ -22,31 +19,58 @@ AC_FUNC_SELECT_ARGTYPES
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit floor getcwd gethostbyname memset mkdir select socket])
+# Checks for internationalization support
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.16.1])
+
+# Search for *-config
+AC_PATH_PROG(SDL_CONFIG, sdl-config)
+AC_PATH_PROG(PKG_CONFIG, pkg-config)
+AC_PATH_PROG(CURL_CONFIG, curl-config)
+
# Checks for libraries
AC_CHECK_LIB([pthread], [pthread_create], ,
AC_MSG_ERROR([ *** Unable to find pthread library]))
AC_CHECK_LIB([guichan], [gcnGuichanVersion], ,
-AC_MSG_ERROR([ *** Unable to find Guichan library (guichan.sf.net)]))
+AC_MSG_ERROR([ *** Unable to find Guichan library (http://guichan.sf.net/)]))
+AC_CHECK_HEADERS([guichan.hpp], ,
+AC_MSG_ERROR([ *** Guichan library found but cannot find headers (http://guichan.sf.net/)]))
-#AC_CHECK_LIB([guichan_sdl], [gcnSDL], ,
-#AC_MSG_ERROR([ *** Unable to find Guichan SDL library (guichan.sf.net)]))
+if test -n "$SDL_CONFIG"; then
+ LIBS="$LIBS `$SDL_CONFIG --libs`"
+ CPPFLAGS="$CPPFLAGS `$SDL_CONFIG --cflags`"
+fi
+AC_CHECK_LIB([SDL], [SDL_Init], ,
+AC_MSG_ERROR([ *** Unable to find SDL library (http://www.libsdl.org/)]))
+AC_CHECK_HEADERS([SDL.h], ,
+AC_MSG_ERROR([ *** SDL library found but cannot find headers (http://www.libsdl.org/)]))
AC_CHECK_LIB([z], [inflate], ,
AC_MSG_ERROR([ *** Unable to find zlib (http://www.gzip.org/zlib/)]))
AC_CHECK_LIB([physfs], [PHYSFS_init], ,
-AC_MSG_ERROR([ *** Unable to find PhysFS library (icculus.org/physfs/)]))
+AC_MSG_ERROR([ *** Unable to find PhysFS library (http://icculus.org/physfs/)]))
+AC_CHECK_HEADERS([physfs.h], ,
+AC_MSG_ERROR([ *** PhysFS library found but cannot find headers (http://icculus.org/physfs/)]))
+if test -n "$CURL_CONFIG"; then
+ LIBS="$LIBS `$CURL_CONFIG --libs`"
+ CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`"
+fi
AC_CHECK_LIB([curl], [curl_global_init], ,
AC_MSG_ERROR([ *** Unable to find CURL library (http://curl.haxx.se/)]))
-CURL_LIBS=" `curl-config --libs`"
-CURL_CFLAGS=" `curl-config --cflags` "
-AC_SUBST(CURL_LIBS)
-AC_SUBST(CURL_CFLAGS)
+AC_CHECK_HEADERS([curl/curl.h], ,
+AC_MSG_ERROR([ *** CURL library found but cannot find headers (http://curl.haxx.se/)]))
+if test -n "$PKG_CONFIG"; then
+ LIBS="$LIBS `$PKG_CONFIG --libs libxml-2.0`"
+ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libxml-2.0`"
+fi
AC_CHECK_LIB([xml2], [xmlInitParser], ,
-AC_MSG_ERROR([ *** Unable to find libxml2 library (xmlsoft.org)]))
+AC_MSG_ERROR([ *** Unable to find libxml2 library (http://xmlsoft.org/)]))
+AC_CHECK_HEADERS([libxml/xmlreader.h], ,
+AC_MSG_ERROR([ *** libxml2 library found but cannot find headers (http://xmlsoft.org/)]))
AC_CHECK_LIB(png, png_write_info, ,
AC_MSG_ERROR([ *** Unable to find png library]))
@@ -61,6 +85,9 @@ AC_MSG_ERROR([ *** Unable to find SDL_ttf library (http://www.libsdl.org/project
AC_CHECK_LIB([SDL_mixer], [Mix_OpenAudio], ,
AC_MSG_ERROR([ *** Unable to find SDL_mixer library (http://www.libsdl.org/projects/SDL_mixer/)]))
+AC_CHECK_LIB([guichan_sdl], [gcnSDL], ,
+AC_MSG_ERROR([ *** Unable to find Guichan SDL library (http://guichan.sf.net/)]))
+
AC_CHECK_LIB(SDL_net, SDLNet_Init, ,
AC_MSG_ERROR([ *** Unable to find SDL_net library]))
@@ -68,12 +95,6 @@ AC_MSG_ERROR([ *** Unable to find SDL_net library]))
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
-# Check for guichan headers
-AC_CHECK_HEADERS([guichan.hpp], ,
-AC_MSG_ERROR([*** Library found but cannot find headers (guichan.sf.net) *** ]))
-
-AM_INIT_AUTOMAKE
-
# Option to enable OpenGL
AC_ARG_WITH(opengl,[ --without-opengl don't use OpenGL ] )
if test "x$with_opengl" == "xno"; then
@@ -85,23 +106,6 @@ else
AC_DEFINE(USE_OPENGL, 1, [Defines if tmw should use an OpenGL display])
fi
-# Search for sdl-config
-AC_PATH_PROG(LIBSDL_CONFIG, sdl-config)
-
-if test -n "$LIBSDL_CONFIG"; then
- LIBSDL_LIBS="`$LIBSDL_CONFIG --libs` -lSDL_image -lSDL_mixer"
- LIBSDL_CFLAGS="`$LIBSDL_CONFIG --cflags`"
- AC_SUBST(LIBSDL_LIBS)
- AC_SUBST(LIBSDL_CFLAGS)
-
- AC_DEFINE_UNQUOTED(HAVE_LIBSDL, 1,
- [Defines if your system has the LIBSDL library])
-else
- AC_DEFINE_UNQUOTED(HAVE_LIBSDL, 0,
- [Defines if your system has the LIBSDL library])
- AC_MSG_ERROR([Could not find sdl-config, check http://www.libsdl.org])
-fi
-
AC_CONFIG_FILES([
Makefile
src/Makefile
@@ -113,6 +117,7 @@ data/graphics/images/Makefile
data/help/Makefile
data/icons/Makefile
docs/Makefile
+po/Makefile.in
])
AC_OUTPUT