File: configure.in

package info (click to toggle)
guichan 0.8.2-16
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,712 kB
  • ctags: 2,094
  • sloc: cpp: 15,578; sh: 10,130; makefile: 254
file content (315 lines) | stat: -rw-r--r-- 7,543 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
AC_PREREQ(2.57)

AC_INIT(guichan, 0.8.2, olof.naessen@gmail.com, guichan)

AC_CANONICAL_SYSTEM
AC_SUBST(target)

ALLEGRO="disabled"
OPENGL="disabled"
SDL="disabled"
SDLIMAGE="disabled"
dnl GLUT="disabled"
dnl X="disabled"

GUICHAN_MAJOR_VERSION=0
GUICHAN_MINOR_VERSION=8
GUICHAN_MICRO_VERSION=2
GUICHAN_INTERFACE_AGE=0
GUICHAN_BINARY_AGE=1
GUICHAN_VERSION=$GUICHAN_MAJOR_VERSION.$GUICHAN_MINOR_VERSION.$GUICHAN_MICRO_VERSION

AC_SUBST(GUICHAN_MAJOR_VERSION)
AC_SUBST(GUICHAN_MINOR_VERSION)
AC_SUBST(GUICHAN_MICRO_VERSION)
AC_SUBST(GUICHAN_INTERFACE_AGE)
AC_SUBST(GUICHAN_BINARY_AGE)
AC_SUBST(GUICHAN_VERSION)

dnl TODO Guichan 0.9.0: Remove the .1
LT_RELEASE=$GUICHAN_MAJOR_VERSION.$GUICHAN_MINOR_VERSION.1
LT_CURRENT=`expr $GUICHAN_MICRO_VERSION - $GUICHAN_INTERFACE_AGE`
LT_REVISION=$GUICHAN_INTERFACE_AGE
LT_AGE=`expr $GUICHAN_BINARY_AGE - $GUICHAN_INTERFACE_AGE`

AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

AM_INIT_AUTOMAKE(guichan, $GUICHAN_VERSION)
AM_CONFIG_HEADER([include/config.hpp])

AC_CONFIG_SRCDIR([src/gui.cpp])

AC_PROG_CXX
AC_PROG_CC

AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_LANG_CPLUSPLUS
AC_PROG_INSTALL
AC_HEADER_STDC

CXXFLAGS="$CXXFLAGS -Wall -Wno-unused -DGUICHAN_BUILD"

dnl NoX()
dnl {
dnl   AC_MSG_WARN(Xlib support skipped when Xlib not found.)
dnl   X="no"
dnl }

dnl HaveX()
dnl {
dnl   X="yes"
dnl   X_LIBS="$X_LIBS -L$x_libraries -lX11"
dnl   GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS x"
dnl }

NoOpenGL()
{
  AC_MSG_WARN(OpenGL support skipped when OpenGL not found.)
  OPENGL="no"
}

HaveOpenGL()
{
  OPENGL="yes"
  GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS opengl"
}

ForceOpenGL()
{
  AC_MSG_WARN(OpenGL support forced.)
  OPENGL="forced"
  GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS opengl"
}

dnl NoGLUT()
dnl {
dnl   AC_MSG_WARN(GLUT support skipped when GLUT not found.)
dnl   GLUT="no"
dnl }

dnl HaveGLUT()
dnl {
dnl   GLUT="yes"
dnl   GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS glut"
dnl }

dnl ForceGLUT()
dnl {
dnl   AC_MSG_WARN(GLUT support forced.)
dnl   GLUT="forced"
dnl   GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS glut"
dnl }

NoSDLImage()
{
  AC_MSG_WARN(SDL_image support skipped when SDL_image not found.)
  SDLIMAGE="no"
}

HaveSDLImage()
{
  SDLIMAGE="yes"
  PKG_CHECK_MODULES([SDL], [sdl SDL_image])
}

ForceSDLImage()
{
  AC_MSG_WARN(SDL Image support forced.)
  SDLIMAGE="forced"
}

HaveSDL()
{
  GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS sdl"
}

ForceSDL()
{
  AC_MSG_WARN(SDL support forced.)
  GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS sdl"
}

NoAllegro()
{
  AC_MSG_WARN(Allegro support skipped when Allegro not found.)
}

HaveAllegro()
{
  ALLEGRO="yes"
  GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS allegro"
}

ForceAllegro()
{
  AC_MSG_WARN(Allegro support forced.)
  ALLEGRO="forced"
  GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS allegro"
}

dnl AC_ARG_ENABLE(x,	     
dnl [  --enable-x	Enable Xlib support [default=no]], 
dnl                , enable_x=no)
dnl if test x$enable_x = xyes; then
dnl   AC_PATH_X
dnl   if test "x$no_x" = "xyes"; then
dnl     NoX
dnl   else
dnl   dnl   AC_CHECK_HEADERS([X11/Xlib.h])
dnl   dnl   AC_CHECK_LIB([X11], [XOpenDisplay], HaveX, NoX)
dnl     HaveX
dnl   fi
dnl fi

AC_ARG_ENABLE(opengl,	     
[  --enable-opengl	Enable OpenGL support [default=yes]], 
               , enable_opengl=yes)
AC_ARG_ENABLE(force_opengl,	  
[  --enable-force-opengl     Force OpenGL support (skip checks for OpenGL) [default=no]],
              , enable_force_opengl=no)
if test x$enable_opengl = xyes; then
  if test x$enable_force_opengl = xno; then
    AC_CHECK_HEADERS(GL/gl.h)
    AC_CHECK_LIB([GL], [glBegin], HaveOpenGL, NoOpenGL)
  else
    ForceOpenGL
  fi
fi

dnl AC_ARG_ENABLE(glut,	     
dnl [  --enable-glut	Enable GLUT support [default=yes]], 
dnl                , enable_glut=yes)
dnl AC_ARG_ENABLE(force_glut,	  
dnl [  --enable-force-glut     Force GLUT support (skip checks for GLUT) [default=no]],
dnl               , enable_force_glut=no)
dnl if test x$enable_glut = xyes; then
dnl   if test x$enable_force_glut = xno; then
dnl     AC_CHECK_HEADERS(GL/glut.h)
dnl     AC_CHECK_LIB([glut], [glutInit], HaveGLUT, NoGLUT)
dnl   else
dnl     ForceGLUT
dnl   fi
dnl fi

AC_ARG_ENABLE(sdlimage,	     
[  --enable-sdlimage	Enable SDL_image support [default=yes]], 
              , enable_sdlimage=yes)
AC_ARG_ENABLE(force_sdlimage,	  
[  --enable-force-sdlimage     Force SDL Image support (skip checks for SDL Image) [default=no]],
              , enable_force_sdlimage=no)
if test x$enable_sdlimage = xyes; then
  if test x$enable_force_sdlimage = xno; then
    AC_CHECK_HEADERS([SDL/SDL_image.h])
    AC_CHECK_LIB([SDL_image], [IMG_Load], HaveSDLImage, NoSDLImage)
  else
    ForceSDLImage
  fi
fi

AC_ARG_ENABLE(allegro,	  
[  --enable-allegro	  Enable Allegro support [default=yes]],
              , enable_allegro=yes)
AC_ARG_ENABLE(force_allegro,	  
[  --enable-force-allegro     Force Allegro support (skip checks for Allegro) [default=no]],
              , enable_force_allegro=no)
if test x$enable_allegro = xyes; then
  if test x$enable_force_allegro = xno; then
    AC_CHECK_HEADERS([allegro.h])
    AC_CHECK_PROG(HAVE_ALLEGRO, allegro-config, yes)
    if test "x$HAVE_ALLEGRO" != "xyes"; then
      NoAllegro  
    else
      HaveAllegro
    fi
  else
    ForceAllegro
  fi
fi

AC_ARG_ENABLE(sdl,	  
[  --enable-sdl	  Enable SDL support [default=yes]],
             , enable_sdl=yes)
AC_ARG_ENABLE(force_sdl,	  
[  --enable-force-sdl     Force SDL support (skip checks for SDL) [default=no]],
              , enable_force_sdl=no)
if test x$enable_sdl = xyes; then
  if test x$enable_force_sdl = xno; then
    AC_CHECK_HEADERS(SDL/SDL.h)
    AC_CHECK_PROG(HAVE_SDL, sdl-config, yes)
    if test "x$HAVE_SDL" != "xyes"; then
      SDL="no"
    else
      SDL="yes"
    fi
  else
    SDL="forced"
    ForceSDL
  fi
fi

if test $SDL = "yes"; then
  if test $SDLIMAGE = "no"; then
    SDL="no"
    AC_MSG_WARN(SDL support skipped when SDL_image not found.)
  else
    HaveSDL
  fi
else
  SDL="no"
  AC_MSG_WARN(SDL support skipped when SDL not found.)
fi

AC_SUBST([GUICHAN_EXTRADIRS])

AC_OUTPUT([
Makefile
guichan-0.8.pc
examples/Makefile
include/Makefile
include/guichan/Makefile
include/guichan/allegro/Makefile
include/guichan/contrib/Makefile
include/guichan/contrib/allegro/Makefile
include/guichan/contrib/opengl/Makefile
include/guichan/contrib/sdl/Makefile
include/guichan/contrib/widgets/Makefile
include/guichan/hge/Makefile
include/guichan/opengl/Makefile
include/guichan/openlayer/Makefile
include/guichan/sdl/Makefile
include/guichan/widgets/Makefile
src/Makefile
src/allegro/Makefile
src/contrib/Makefile
src/contrib/allegro/Makefile
src/contrib/opengl/Makefile
src/contrib/sdl/Makefile
src/contrib/widgets/Makefile
src/hge/Makefile
src/opengl/Makefile
src/opengl/guichan_opengl-0.8.pc
src/openlayer/Makefile
src/sdl/Makefile
src/sdl/guichan_sdl-0.8.pc
src/widgets/Makefile])
echo ""
echo "IMPORTANT! You are about install a BETA version of Guichan"
echo "which most likely will lose binary compatibility with the"
echo "future stable release. This release should only be used" 
echo "for testing."
echo ""
echo "-------------------------------"
echo "Guichan ready for compilation!" 
echo "-------------------------------"
echo "* Allegro   = "$ALLEGRO
echo "* HGE       = no (Windows specific and cannot be built)"
echo "* OpenGL    = "$OPENGL
echo "* OpenLayer = no (Requires static build and cannot be built)"
echo "* SDL       = "$SDL
echo "* SDL Image = "$SDLIMAGE
echo "--------------------------------"