summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.in255
-rw-r--r--m4/expedite_check_engine.m441
-rw-r--r--src/bin/Makefile.am17
5 files changed, 79 insertions, 238 deletions
diff --git a/Makefile.am b/Makefile.am
index 951b531..57aaae1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
1ACLOCAL_AMFLAGS = -I m4
2
1SUBDIRS = src data 3SUBDIRS = src data
2 4
3MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \ 5MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
diff --git a/autogen.sh b/autogen.sh
index 0846992..995ff2f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,7 +5,7 @@ rm -f aclocal.m4 ltmain.sh
5 5
6touch README 6touch README
7 7
8echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1 8echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
9echo "Running autoheader..." ; autoheader || exit 1 9echo "Running autoheader..." ; autoheader || exit 1
10echo "Running autoconf..." ; autoconf || exit 1 10echo "Running autoconf..." ; autoconf || exit 1
11echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 11echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
diff --git a/configure.in b/configure.in
index a4aee2a..34a3851 100644
--- a/configure.in
+++ b/configure.in
@@ -3,46 +3,19 @@ dnl Process this file with autoconf to produce a configure script.
3# get rid of that stupid cache mechanism 3# get rid of that stupid cache mechanism
4rm -f config.cache 4rm -f config.cache
5 5
6AC_INIT(configure.in) 6AC_INIT(expedite, 0.6.0, enlightenment-devel@lists.sourceforge.net)
7AM_INIT_AUTOMAKE(expedite, 0.6.0) 7AC_PREREQ(2.52)
8AC_CONFIG_SRCDIR(configure.in)
9
10AM_INIT_AUTOMAKE(1.6 dist-bzip2)
8AM_CONFIG_HEADER(config.h) 11AM_CONFIG_HEADER(config.h)
9 12
10AC_ISC_POSIX 13AC_ISC_POSIX
14AC_PROG_CXX
11AC_PROG_CC 15AC_PROG_CC
12AM_PROG_CC_STDC 16AM_PROG_CC_STDC
13AC_HEADER_STDC 17AC_HEADER_STDC
14AC_C_CONST 18AC_C_CONST
15AM_ENABLE_SHARED
16AM_PROG_LIBTOOL
17
18if test "x${bindir}" = 'xNONE'; then
19 if test "x${prefix}" = "xNONE"; then
20 PACKAGE_BIN_DIR="${ac_default_prefix}/bin"
21 else
22 PACKAGE_BIN_DIR="${prefix}/bin"
23 fi
24else
25 PACKAGE_BIN_DIR="${bindir}"
26fi
27AC_SUBST(PACKAGE_BIN_DIR)
28
29if test "x${libdir}" = 'xNONE'; then
30 if test "x${prefix}" = "xNONE"; then
31 PACKAGE_LIB_DIR="${ac_default_prefix}/lib"
32 else
33 PACKAGE_LIB_DIR="${prefix}/lib"
34 fi
35else
36 PACKAGE_LIB_DIR="${libdir}"
37fi
38AC_SUBST(PACKAGE_LIB_DIR)
39
40if test "x${prefix}" = "xNONE"; then
41 PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
42else
43 PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
44fi
45AC_SUBST(PACKAGE_DATA_DIR)
46 19
47PKG_CHECK_MODULES([EVAS], evas) 20PKG_CHECK_MODULES([EVAS], evas)
48 21
@@ -55,227 +28,40 @@ AC_ARG_ENABLE(simple-x11,
55) 28)
56 29
57### OpenGL GLEW 30### OpenGL GLEW
58want_opengl_glew="yes" 31EXPEDITE_CHECK_ENGINE([opengl-glew], [OpenGL Glew], "yes", [glew_libs="-lglew32 -lgdi32"])
59AC_MSG_CHECKING(whether OpenGL GLEW)
60AC_ARG_ENABLE(opengl-glew,
61 AC_HELP_STRING([--enable-opengl-glew], [enable OpenGL GLEW engine]),
62 [ want_opengl_glew=$enableval ]
63)
64AC_MSG_RESULT($want_opengl_glew)
65if test "x$want_opengl_glew" = "xyes"; then
66 PKG_CHECK_EXISTS(evas-opengl-glew,
67 [
68 AC_DEFINE(HAVE_EVAS_OPENGL_GLEW, 1, [Evas GL Glew Engine Support])
69 have_opengl_glew="yes"
70 glew_libs="-lglew32 -lgdi32"
71 ],
72 [ have_opengl_glew="no" ]
73 )
74fi
75AM_CONDITIONAL(BUILD_OPENGL_GLEW, test "x$have_opengl_glew" = "xyes")
76 32
77### OpenGL X11 33### OpenGL X11
78want_opengl_x11="yes" 34EXPEDITE_CHECK_ENGINE([opengl-x11], [OpenGL X11], "yes")
79AC_MSG_CHECKING(whether OpenGL X11)
80AC_ARG_ENABLE(opengl-x11,
81 AC_HELP_STRING([--enable-opengl-x11], [enable OpenGL X11 engine]),
82 [ want_opengl_x11=$enableval ]
83)
84AC_MSG_RESULT($want_opengl_x11)
85if test "x$want_opengl_x11" = "xyes"; then
86 PKG_CHECK_EXISTS(evas-opengl-x11,
87 [
88 AC_DEFINE(HAVE_EVAS_OPENGL_X11, 1, [Evas GL X11 Engine Support])
89 have_opengl_x11="yes"
90 ],
91 [ have_opengl_x11="no" ]
92 )
93fi
94AM_CONDITIONAL(BUILD_OPENGL_X11, test "x$have_opengl_x11" = "xyes")
95 35
96### Software X11 36### Software X11
97want_software_x11="yes" 37EXPEDITE_CHECK_ENGINE([software-x11], [Software X11], "yes")
98AC_MSG_CHECKING(whether Software X11)
99AC_ARG_ENABLE(software-x11,
100 AC_HELP_STRING([--enable-software-x11], [enable Software X11 engine]),
101 [ want_software_x11=$enableval ]
102)
103AC_MSG_RESULT($want_software_x11)
104if test "x$want_software_x11" = "xyes"; then
105 PKG_CHECK_EXISTS(evas-software-x11,
106 [
107 AC_DEFINE(HAVE_EVAS_SOFTWARE_X11, 1, [Evas Software X11 Engine Support])
108 have_software_x11="yes"
109 ],
110 [ have_software_x11="no" ]
111 )
112fi
113AM_CONDITIONAL(BUILD_SOFTWARE_X11, test "x$have_software_x11" = "xyes")
114 38
115### XRender X11 39### XRender X11
116want_xrender_x11="yes" 40EXPEDITE_CHECK_ENGINE([xrender-x11], [XRender X11], "yes")
117AC_MSG_CHECKING(whether XRender X11)
118AC_ARG_ENABLE(xrender-x11,
119 AC_HELP_STRING([--enable-xrender-x11], [enable XRender X11 engine]),
120 [ want_xrender_x11=$enableval ]
121)
122AC_MSG_RESULT($want_xrender_x11)
123if test "x$want_xrender_x11" = "xyes"; then
124 PKG_CHECK_EXISTS(evas-xrender-x11,
125 [
126 AC_DEFINE(HAVE_EVAS_XRENDER_X11, 1, [Evas XRender X11 Engine Support])
127 have_xrender_x11="yes"
128 ],
129 [ have_xrender_x11="no" ]
130 )
131fi
132AM_CONDITIONAL(BUILD_XRENDER_X11, test "x$have_xrender_x11" = "xyes")
133 41
134### Software 16bit X11 42### Software 16bit X11
135want_software_16_x11="yes" 43EXPEDITE_CHECK_ENGINE([software-16-x11], [Software 16 bits X11], "yes")
136AC_MSG_CHECKING(whether Software 16bit X11)
137AC_ARG_ENABLE(software-16-x11,
138 AC_HELP_STRING([--enable-software-16-x11], [enable Software 16bit X11 engine]),
139 [ want_software_16_x11=$enableval ]
140)
141AC_MSG_RESULT($want_software_16_x11)
142if test "x$want_software_16_x11" = "xyes"; then
143 PKG_CHECK_EXISTS(evas-software-16-x11,
144 [
145 AC_DEFINE(HAVE_EVAS_SOFTWARE_16_X11, 1, [Evas Software 16bit X11 Engine Support])
146 have_software_16_x11="yes"
147 ],
148 [ have_software_16_x11="no" ]
149 )
150fi
151AM_CONDITIONAL(BUILD_SOFTWARE_16_X11, test "x$have_software_16_x11" = "xyes")
152 44
153### FB 45### FB
154want_fb="yes" 46EXPEDITE_CHECK_ENGINE([fb], [Framebuffer], "yes")
155AC_MSG_CHECKING(whether Framebuffer)
156AC_ARG_ENABLE(fb,
157 AC_HELP_STRING([--enable-fb], [enable Framebuffer engine]),
158 [ want_fb=$enableval ]
159)
160AC_MSG_RESULT($want_fb)
161if test "x$want_fb" = "xyes"; then
162 PKG_CHECK_EXISTS(evas-framebuffer,
163 [
164 AC_DEFINE(HAVE_EVAS_FB, 1, [Evas FB Engine Support])
165 have_fb="yes"
166 ],
167 [ have_fb="no" ]
168 )
169fi
170AM_CONDITIONAL(BUILD_FB, test "x$have_fb" = "xyes")
171 47
172### DIRECTFB 48### DIRECTFB
173want_directfb="yes" 49EXPEDITE_CHECK_ENGINE([directfb], [DirectFB], "yes")
174AC_MSG_CHECKING(whether DirectFB)
175AC_ARG_ENABLE(directfb,
176 AC_HELP_STRING([--enable-directfb], [enable DirectFB engine]),
177 [ want_directfb=$enableval ]
178)
179AC_MSG_RESULT($want_directfb)
180if test "x$want_directfb" = "xyes"; then
181 PKG_CHECK_EXISTS(evas-directfb,
182 [
183 AC_DEFINE(HAVE_EVAS_DIRECTFB, 1, [Evas DirectFB Engine Support])
184 have_evas_directfb="yes"
185 ],
186 [ have_evas_directfb="no" ]
187 )
188fi
189if test "x$have_evas_directfb" = "xyes"; then
190 PKG_CHECK_MODULES([DIRECTFB], directfb,
191 [ have_directfb="yes" ],
192 [ have_directfb="no" ])
193else
194 have_directfb="no"
195fi
196AM_CONDITIONAL(BUILD_DIRECTFB, test "x$have_directfb" = "xyes")
197 50
198# TODO: Check availability of libs 51# TODO: Check availability of libs
199### DirectDraw 52### DirectDraw
200want_software_ddraw="yes" 53EXPEDITE_CHECK_ENGINE([software-ddraw], [Software DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid"])
201AC_MSG_CHECKING(whether Software DirectDraw)
202AC_ARG_ENABLE(software-ddraw,
203 AC_HELP_STRING([--enable-software-ddraw], [enable Software DirectDraw engine]),
204 [ want_software_ddraw=$enableval ]
205)
206AC_MSG_RESULT($want_software_ddraw)
207if test "x$want_software_ddraw" = "xyes"; then
208 PKG_CHECK_EXISTS(evas-software-ddraw,
209 [
210 AC_DEFINE(HAVE_EVAS_SOFTWARE_DDRAW, 1, [Evas Software DirectDraw Engine Support])
211 have_software_ddraw="yes"
212 ddraw_libs="-lddraw -ldxguid"
213 ],
214 [ have_software_ddraw="no" ]
215 )
216fi
217AM_CONDITIONAL(BUILD_SOFTWARE_DDRAW, test "x$have_software_ddraw" = "xyes")
218 54
219# TODO: Check availability of libs 55# TODO: Check availability of libs
220### 16bit DirectDraw 56### 16bit DirectDraw
221want_software_16_ddraw="yes" 57EXPEDITE_CHECK_ENGINE([software-16-ddraw], [Software 16 bits DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid"])
222AC_MSG_CHECKING(whether Software 16bit DirectDraw)
223AC_ARG_ENABLE(software-16-ddraw,
224 AC_HELP_STRING([--enable-software-16-ddraw], [enable Software 16bit DirectDraw engine]),
225 [ want_software_16_ddraw=$enableval ]
226)
227AC_MSG_RESULT($want_software_16_ddraw)
228if test "x$want_software_ddraw" = "xyes"; then
229 PKG_CHECK_EXISTS(evas-software-16-ddraw,
230 [
231 AC_DEFINE(HAVE_EVAS_SOFTWARE_16_DDRAW, 1, [Evas Software 16bit DirectDraw Engine Support])
232 have_software_16_ddraw="yes"
233 ddraw_libs="-lddraw -ldxguid"
234 ],
235 [ have_software_16_ddraw="no" ]
236 )
237fi
238AM_CONDITIONAL(BUILD_SOFTWARE_16_DDRAW, test "x$have_software_16_ddraw" = "xyes")
239 58
240# TODO: Check availability of libs 59# TODO: Check availability of libs
241### Direct3D 60### Direct3D
242want_direct3d="yes" 61EXPEDITE_CHECK_ENGINE([direct3d], [Direct3D], "yes", [d3d_libs="-ld3d9 -ld3dx9d"])
243AC_MSG_CHECKING(whether Direct3D)
244AC_ARG_ENABLE(direct3d,
245 AC_HELP_STRING([--enable-direct3d], [enable Direct3D engine]),
246 [ want_direct3d=$enableval ]
247)
248AC_MSG_RESULT($want_direct3d)
249if test "x$want_direct3d" = "xyes"; then
250 PKG_CHECK_EXISTS(evas-direct3d,
251 [
252 AC_DEFINE(HAVE_EVAS_DIRECT3D, 1, [Evas Direct3D Engine Support])
253 have_direct3d="yes"
254 d3d_libs="-ld3d9 -ld3dx9d"
255 ],
256 [ have_direct3d="no" ]
257 )
258fi
259AM_CONDITIONAL(BUILD_DIRECT3D, test "x$have_direct3d" = "xyes")
260 62
261### Software SDL 63### Software SDL
262want_software_sdl="yes" 64EXPEDITE_CHECK_ENGINE([software-sdl], [Software SDL], "yes")
263AC_MSG_CHECKING(whether Software SDL)
264AC_ARG_ENABLE(software-sdl,
265 AC_HELP_STRING([--enable-software-sdl], [enable Software SDL engine]),
266 [ want_software_sdl=$enableval ]
267)
268AC_MSG_RESULT($want_software_sdl)
269if test "x$want_software_sdl" = "xyes"; then
270 PKG_CHECK_EXISTS(evas-software-sdl,
271 [
272 AC_DEFINE(HAVE_EVAS_SOFTWARE_SDL, 1, [Evas Software SDL Engine Support])
273 have_software_sdl="yes"
274 ],
275 [ have_software_sdl="no" ]
276 )
277fi
278AM_CONDITIONAL(BUILD_SOFTWARE_SDL, test "x$have_software_sdl" = "xyes")
279 65
280if test "x$have_software_x11" = "xyes" -o "x$have_software_16_x11" = "xyes" -o "x$have_xrender_x11" = "xyes" -o "x$have_opengl_x11" = "xyes"; then 66if test "x$have_software_x11" = "xyes" -o "x$have_software_16_x11" = "xyes" -o "x$have_xrender_x11" = "xyes" -o "x$have_opengl_x11" = "xyes"; then
281 AC_PATH_XTRA 67 AC_PATH_XTRA
@@ -299,6 +85,13 @@ if test "x$have_software_sdl" = "xyes"; then
299fi 85fi
300AM_CONDITIONAL(BUILD_SDL, test "x$have_sdl" = "xyes") 86AM_CONDITIONAL(BUILD_SDL, test "x$have_sdl" = "xyes")
301 87
88if test "x$have_directfb" = "xyes"; then
89 PKG_CHECK_MODULES([DIRECTFB], directfb,
90 [ have_directfb="yes" ],
91 [ have_directfb="no" ])
92fi
93AM_CONDITIONAL(BUILD_DIRECTFB, test "x$have_directfb" = "xyes")
94
302AC_SUBST(x_cflags) 95AC_SUBST(x_cflags)
303AC_SUBST(x_libs) 96AC_SUBST(x_libs)
304AC_SUBST(ddraw_libs) 97AC_SUBST(ddraw_libs)
diff --git a/m4/expedite_check_engine.m4 b/m4/expedite_check_engine.m4
new file mode 100644
index 0000000..2909a0d
--- /dev/null
+++ b/m4/expedite_check_engine.m4
@@ -0,0 +1,41 @@
1dnl use: EXPEDITE_CHECK_ENGINE(Engine, Description, want[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
2AC_DEFUN([EXPEDITE_CHECK_ENGINE],
3[
4pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl
5pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl
6
7want_[]DOWN=$3
8have_[]DOWN="no"
9
10AC_ARG_ENABLE($1,
11 AC_HELP_STRING([--enable-$1], [enable $2 engine]),
12 [ want_[]DOWN=$enableval ]
13)
14
15AC_MSG_CHECKING([whether $2 engine is to be built])
16AC_MSG_RESULT($want_[]DOWN)
17
18if test "x$want_[]DOWN" = "xyes"; then
19 PKG_CHECK_EXISTS([evas-$1],
20 [
21 AC_DEFINE(HAVE_EVAS_[]UP, 1, [Evas $2 Engine Support])
22 have_[]DOWN="yes"
23 ],
24 [ have_[]DOWN="no" ]
25 )
26fi
27
28AC_MSG_CHECKING([whether $2 engine is available])
29AC_MSG_RESULT($have_[]DOWN)
30
31AM_CONDITIONAL(BUILD_[]UP, [test "x$have_[]DOWN" = "xyes"])
32
33if test "x$have_[]DOWN" = "xyes" ; then
34 ifelse([$4], , :, [$4])
35else
36 ifelse([$5], , :, [$5])
37fi
38
39popdef([UP])
40popdef([DOWN])
41])
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 65aa4f8..68145f3 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -1,10 +1,15 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2INCLUDES = -I$(top_srcdir) \ 2
3 -I$(top_srcdir)/src/bin \ 3AM_CPPFLAGS = \
4 @EVAS_CFLAGS@ @x_cflags@ @SDL_CFLAGS@ @DIRECTFB_CFLAGS@ \ 4-I$(top_srcdir) \
5 -DPACKAGE_BIN_DIR=\"@PACKAGE_BIN_DIR@\" \ 5-I$(top_srcdir)/src/bin \
6 -DPACKAGE_LIB_DIR=\"@PACKAGE_LIB_DIR@\" \ 6-DPACKAGE_BIN_DIR=\"$(bindir)\" \
7 -DPACKAGE_DATA_DIR=\"@PACKAGE_DATA_DIR@\" 7-DPACKAGE_LIB_DIR=\"$(libdir)\" \
8-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
9@EVAS_CFLAGS@ \
10@x_cflags@ \
11@SDL_CFLAGS@ \
12@DIRECTFB_CFLAGS@
8 13
9bin_PROGRAMS = expedite 14bin_PROGRAMS = expedite
10 15