From 4373f211f19f7801dfc3c87ccd8fa88dd60003bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Wychrystenko?= Date: Sat, 14 Mar 2009 18:16:23 +0000 Subject: [PATCH] fixed build scripts (credist goes to scoruppa) --- Makefile.am | 3 ++- bootstrap.sh | 6 ++++++ configure.ac | 21 ++++----------------- 3 files changed, 12 insertions(+), 18 deletions(-) create mode 100755 bootstrap.sh diff --git a/Makefile.am b/Makefile.am index cba8ce236..47c09bbac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,8 @@ EXTRA_DIST = aclocal/m4 #bin_PROGRAMS = vcmi #vcmi_LDADD = $(BOOST_SYSTEM_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_THREAD_LIB) AM_CXXFLAGS = $(BOOST_CPPFLAGS) -SUBDIRS = lib client server AI +AM_LDFLAGS = $(BOOST_LDFLAGS) +SUBDIRS = lib client server #vcmi_SOURCES = \ # AdventureMapButton.cpp CGameState.cpp \ # AdventureMapButton.h CGameState.h global.h \ diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 000000000..f4e0a783c --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,6 @@ +#!/bin/sh -x +libtoolize --copy --force +aclocal +autoheader +automake --add-missing +autoreconf --install diff --git a/configure.ac b/configure.ac index 53720c76a..16316b18f 100644 --- a/configure.ac +++ b/configure.ac @@ -8,11 +8,12 @@ AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CXX -AX_BOOST_BASE([1.33]) +AC_PROG_CXX +AC_PROG_CC +AX_BOOST_BASE([1.37]) AX_BOOST_SYSTEM AX_BOOST_FILESYSTEM AX_BOOST_THREAD -AC_PROG_CC AC_PROG_CPP AC_ENABLE_SHARED AC_DISABLE_STATIC @@ -28,17 +29,6 @@ LIBS="-L$stdcxx_path $LIBS" fi AC_CHECK_PROG(HAVE_SDL_CONFIG, sdl-config, yes, no) -AC_ARG_WITH(lua-includes,AC_HELP_STRING([--with-lua-includes=INCLUDE_PATH],[Use Lua library headers installed at specified - path(default=check)]),LUA_INCLUDES="$with_lua_includes") -if test "$LUA_INCLUDES" != ""; then -AC_SUBST([CPPFLAGS],["$CPPFLAGS -I$LUA_INCLUDES"]) -fi - -AC_ARG_WITH(lua-libs,AC_HELP_STRING([--with-lua-libs=INCLUDE_PATH],[Use Lua library installed at specified - path(default=check)]),LUA_LIBS="$with_lua_libs") -if test "$LUA_LIBS" != ""; then -AC_SUBST([LIBS],["$LIBS -L$LUA_LIBS"]) -fi # Checks for libraries. if test "$HAVE_SDL_CONFIG" = no; then @@ -54,12 +44,10 @@ CPPFLAGS="$CPPFLAGS $SDL_CFLAGS" AC_CHECK_LIB(SDL_mixer,main,,AC_MSG_ERROR([SDL_mixer library not found. Please install it.])) AC_CHECK_LIB(SDL_image,IMG_Load,,AC_MSG_ERROR([SDL_image library not found. Please install it.])) AC_CHECK_LIB(SDL_ttf,main,,AC_MSG_ERROR([SDL_ttf library not found. Please install it.])) -AC_CHECK_LIB(lua,main,,AC_MSG_ERROR([lua library not found. Please install it.])) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdlib.h string.h]) -AC_CHECK_HEADER(lstate.h,,AC_MSG_ERROR([lstate.h header not found. Please install it.])) AC_LANG_PUSH(C++) CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_CHECK_HEADERS([boost/filesystem.hpp boost/algorithm/string.hpp boost/algorithm/string/replace.hpp boost/filesystem/operations.hpp boost/assign/std/vector.hpp boost/algorithm/string/find.hpp boost/function.hpp boost/bind.hpp],,AC_MSG_ERROR([Required boost headers not found. Please install it.])) @@ -74,7 +62,6 @@ AC_C_INLINE AC_FUNC_ALLOCA AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES -AC_CHECK_FUNCS([lua_pushhstring lua_calchash],, AC_MSG_ERROR([Lua required fuctions not found])) AC_CHECK_FUNCS([atexit memset pow select sqrt]) -AC_OUTPUT(Makefile lib/Makefile client/Makefile server/Makefile AI/Makefile) +AC_OUTPUT(Makefile lib/Makefile client/Makefile server/Makefile)