/[enigma]/enigma/configure.ac
ViewVC logotype

Diff of /enigma/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by dheck, Thu Sep 11 18:20:27 2003 UTC revision 1.9 by dheck, Fri Sep 12 21:37:24 2003 UTC
# Line 1  Line 1 
1  # Process this file with autoconf to produce a configure script.  # Process this file with autoconf to produce a configure script.
2  AC_INIT(src/enigma.cc)  AC_INIT
3    AC_CONFIG_SRCDIR([src/enigma.cc])
4    AC_CANONICAL_BUILD
5  AC_CANONICAL_TARGET  AC_CANONICAL_TARGET
6  AM_INIT_AUTOMAKE(enigma, 0.79-cvs)  dnl AC_CANONICAL_HOST
7    AM_INIT_AUTOMAKE(enigma, 0.80-beta)
8  AM_CONFIG_HEADER(src/config.h)  AM_CONFIG_HEADER(src/config.h)
9    
10  dnl ======================================================================  dnl ======================================================================
# Line 12  AC_PROG_CXX Line 15  AC_PROG_CXX
15  AC_PROG_CPP  AC_PROG_CPP
16  AC_PROG_RANLIB  AC_PROG_RANLIB
17    
18  AC_MINGW32  case $host_os in
19      *mingw32* ) MINGW32=yes;;
20              * ) MINGW32=no;;
21    esac
22    
23  AM_CONDITIONAL(MINGW32, test x$MINGW32 = xyes)  AM_CONDITIONAL(MINGW32, test x$MINGW32 = xyes)
24  AC_SUBST(WINDRES)  AC_SUBST(WINDRES)
25    
# Line 22  dnl ==================================== Line 29  dnl ====================================
29  AM_PATH_SDL(1.2.0)  AM_PATH_SDL(1.2.0)
30  AC_SUBST(SDL_LIBS)  AC_SUBST(SDL_LIBS)
31  AC_SUBST(SDL_CFLAGS)  AC_SUBST(SDL_CFLAGS)
 dnl LIBS="$LIBS $SDL_LIBS"  
 dnl CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"  
32    
33  dnl ----------------------------------------  dnl ----------------------------------------
34  dnl Check for SDL image library  dnl Check for SDL image library
# Line 45  dnl Check for SDL_ttf library Line 50  dnl Check for SDL_ttf library
50  dnl ---------------------------------------  dnl ---------------------------------------
51  AC_CHECK_LIB(SDL_ttf,main,have_sdlttf="yes", have_sdlttf="no")  AC_CHECK_LIB(SDL_ttf,main,have_sdlttf="yes", have_sdlttf="no")
52    
 dnl ----------------------------------------  
 dnl Check for Lua  
 dnl ----------------------------------------  
 dnl AC_CHECK_LIB(lua, lua_newuserdatabox, have_newlua=yes, have_newlua=no)  
   
 dnl if test "$have_newlua" = no; then  
 dnl     AC_MSG_CHECKING(for Lua 4.0)  
 dnl     AC_CHECK_LIB(lua, lua_open, have_lua="yes", have_lua="no")  
 dnl     if test "$have_lua" = no; then  
 dnl         AC_MSG_ERROR([You must have Lua installed to compile Enigma.])  
 dnl     fi  
 dnl else  
 dnl     AC_DEFINE(HAVE_NEWLUA, 1, [Define if Lua version is > 4.0])  
 dnl fi  
   
 dnl ----------------------------------------  
 dnl Check for ToLua  
 dnl ----------------------------------------  
 dnl AC_ARG_VAR(TOLUA, "Path to 'tolua' program")  
 dnl AC_PATH_PROG(TOLUA, tolua, tolua, $PATH:./)  
   
   
 dnl ----------------------------------------  
 dnl Check for libtolua  
 dnl ----------------------------------------  
 dnl AC_MSG_CHECKING([for local libtolua  
   
 dnl LIBTOLUAFLAGS='-I$(top_srcdir)/lib-src/libtolua'  
 dnl AC_SUBST(LIBTOLUAFLAGS)  
53    
54  dnl  dnl
55  dnl Activate optimizations when profiling, to get rid of  dnl Activate optimizations when profiling, to get rid of
# Line 81  dnl inlineable functions. Line 57  dnl inlineable functions.
57  dnl  dnl
58  AC_MSG_CHECKING(whether to include profiling information)  AC_MSG_CHECKING(whether to include profiling information)
59  AC_ARG_ENABLE(profile,  AC_ARG_ENABLE(profile,
60    AC_HELP_STRING([--enable-profile],[Compile with profiling information]),    AC_HELP_STRING([--enable-profile],[Compile with profiling information]), ,
61    [if test "$enableval" = yes; then    enable_profile=no
      CXXFLAGS="$CXXFLAGS -pg -O2"  
      AC_MSG_RESULT(yes)  
    fi  
   ],  
   [  
     enable_profile = no  
     AC_MSG_RESULT(no)]  
62  )  )
63    if test "x$enable_profile" = xyes; then
64      CXXFLAGS="$CXXFLAGS -pg -O2"
65      AC_MSG_RESULT(yes)
66    else
67      AC_MSG_RESULT(no)
68    fi
69    
70  dnl ----------------------------------------  dnl ----------------------------------------
71  dnl Build the developer tools?  dnl Build the developer tools?
# Line 98  dnl ------------------------------------ Line 73  dnl ------------------------------------
73    
74  AC_MSG_CHECKING(whether to build the developer tools)  AC_MSG_CHECKING(whether to build the developer tools)
75  AC_ARG_ENABLE(tools,  AC_ARG_ENABLE(tools,
76    AC_HELP_STRING([--enable-tools],[Build developer tools]),    AC_HELP_STRING([--enable-tools],[Build developer tools]), ,
77    , enable_tools=no)    enable_tools=no
78    )
79    if test "x$enable_tools" = xyes; then
80      AC_MSG_RESULT(yes)
81    else
82      AC_MSG_RESULT(no)
83    fi
84    
85  AM_CONDITIONAL(BUILDTOOLS, [test "$enable_tools" = yes])  AM_CONDITIONAL(BUILDTOOLS, [test "$enable_tools" = yes])
86  AM_CONDITIONAL(BUILDTTF2BMF, [test "$have_sdlttf" = yes -a "$enable_tools" = yes])  AM_CONDITIONAL(BUILDTTF2BMF, [test "$have_sdlttf" = yes -a "$enable_tools" = yes])
87    
# Line 109  dnl ------------------------------------ Line 91  dnl ------------------------------------
91    
92  AC_MSG_CHECKING(whether to optimize the game)  AC_MSG_CHECKING(whether to optimize the game)
93  AC_ARG_ENABLE(optimize,  AC_ARG_ENABLE(optimize,
94          [  --enable-optimize       compile with optimizations], ,    AC_HELP_STRING([--enable-optimize], [Compile with optimizations]), ,
95          enable_optimize=no    enable_optimize=no
96  )  )
97  if test "x$enable_optimize" = xyes; then  if test "x$enable_optimize" = xyes; then
98          CXXFLAGS="$CXXFLAGS -O2 -fomit-frame-pointer"          CXXFLAGS="$CXXFLAGS -O2 -fomit-frame-pointer"
# Line 126  dnl ------------------------------------ Line 108  dnl ------------------------------------
108    
109  AC_MSG_CHECKING(whether to debug the game with gdb)  AC_MSG_CHECKING(whether to debug the game with gdb)
110  AC_ARG_ENABLE(debug-gdb,  AC_ARG_ENABLE(debug-gdb,
111          [  --enable-debug-gdb       compile with special debugging options for gdb ], ,    AC_HELP_STRING([--enable-debug-gdb],[Compile with special debugging options for gdb]), ,
112          enable_debug_gdb=no    enable_debug_gdb=no
113  )  )
114  if test "x$enable_debug_gdb" = xyes; then  if test "x$enable_debug_gdb" = xyes; then
115          CXXFLAGS="$CXXFLAGS -ggdb3 -fno-inline -fno-default-inline -fno-omit-frame-pointer -fno-optimize-sibling-calls"          CXXFLAGS="$CXXFLAGS -ggdb3 -fno-inline -fno-default-inline -fno-omit-frame-pointer -fno-optimize-sibling-calls"
# Line 143  dnl ------------------------------------ Line 125  dnl ------------------------------------
125    
126  AC_MSG_CHECKING(whether to enable warnings)  AC_MSG_CHECKING(whether to enable warnings)
127  AC_ARG_ENABLE(warnings,  AC_ARG_ENABLE(warnings,
128          [  --enable-warnings       enable most compiler warnings ], ,    AC_HELP_STRING([--enable-warnings],[Enable additional compiler warnings]), ,
129          enable_warnings=no    enable_warnings=no
130  )  )
131  if test "x$enable_warnings" = xyes; then  if test "x$enable_warnings" = xyes; then
132          CXXFLAGS="$CXXFLAGS -O2 -Wall -W"          CXXFLAGS="$CXXFLAGS -O2 -Wall -W"
# Line 174  dnl     echo "Continuing ..." Line 156  dnl     echo "Continuing ..."
156  dnl     echo  dnl     echo
157  dnl fi  dnl fi
158    
159  AC_OUTPUT([Makefile  AC_CONFIG_FILES([Makefile
160             data/Makefile             data/Makefile
161             data/gfx/Makefile             data/gfx/Makefile
162             data/levels/Makefile             data/levels/Makefile
# Line 182  AC_OUTPUT([Makefile Line 164  AC_OUTPUT([Makefile
164             data/fonts/Makefile             data/fonts/Makefile
165             data/sound/Makefile             data/sound/Makefile
166             doc/Makefile             doc/Makefile
167               doc/manual/Makefile
168               doc/manual/images/Makefile
169             etc/Makefile             etc/Makefile
170             lib-src/Makefile             lib-src/Makefile
171             lib-src/oxydlib/Makefile             lib-src/oxydlib/Makefile
# Line 189  AC_OUTPUT([Makefile Line 173  AC_OUTPUT([Makefile
173             src/Makefile             src/Makefile
174             src/px/Makefile             src/px/Makefile
175             tools/Makefile             tools/Makefile
176               etc/enigma.spec
177  ])  ])
178    AC_OUTPUT
179    
180  AC_MSG_RESULT([  AC_MSG_RESULT([
181    
182  Enigma is now configured for $canonical_host_type  Enigma is now configured
183    
184     Source directory:    $srcdir     Source directory:    $srcdir
185     Installation prefix: $prefix     Installation prefix: $prefix

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26