summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2008-11-19 17:40:05 +0000
committerVincent Torri <vincent.torri@gmail.com>2008-11-19 17:40:05 +0000
commitd8ecd625fddd2148fe53733c45ed87321a3010cf (patch)
treeff7d548af682def44018c9024c54ff602bd4697d /configure.ac
parentf329fb2d609b9be7ec871a7fbb487b82c3e182b6 (diff)
* configure reorganisation
* add gdi backend to the Windows CE engine SVN revision: 37715
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac207
1 files changed, 124 insertions, 83 deletions
diff --git a/configure.ac b/configure.ac
index 3546c25..f15250e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,151 +3,192 @@ 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(expedite, 0.6.0, enlightenment-devel@lists.sourceforge.net) 6AC_INIT([expedite], [0.6.0], [enlightenment-devel@lists.sourceforge.net])
7AC_PREREQ(2.52) 7AC_PREREQ([2.52])
8AC_CONFIG_SRCDIR(configure.ac) 8AC_CONFIG_SRCDIR([configure.ac])
9AC_CANONICAL_BUILD 9AC_CANONICAL_BUILD
10AC_CANONICAL_HOST 10AC_CANONICAL_HOST
11 11
12AM_INIT_AUTOMAKE(1.6 dist-bzip2) 12AM_INIT_AUTOMAKE(1.6 dist-bzip2)
13AM_CONFIG_HEADER(config.h) 13AM_CONFIG_HEADER(config.h)
14 14
15AC_ISC_POSIX
16m4_ifdef([AC_PROG_OBJC],
17 [AC_PROG_OBJC],
18 [AC_CHECK_TOOL([OBJC], [gcc])
19 AC_SUBST([OBJC])
20 AC_SUBST([OBJCFLAGS])
21 ])
22AC_PROG_CXX
23AC_PROG_CC
24AM_PROG_CC_STDC
25AC_HEADER_STDC
26AC_C_CONST
27AM_PROG_CC_C_O
28PKG_PROG_PKG_CONFIG 15PKG_PROG_PKG_CONFIG
29 16
30WIN32_CFLAGS=""
31lt_enable_auto_import=""
32case "$host_os" in
33 mingw32ce*)
34 PKG_CHECK_MODULES([EVIL], [evil])
35 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
36 lt_enable_auto_import="-Wl,--enable-auto-import"
37 ;;
38 cegcc*)
39 WIN32_CFLAGS="-mwin32"
40 lt_enable_auto_import="-Wl,--enable-auto-import"
41 ;;
42esac
43AC_SUBST(WIN32_CFLAGS)
44AC_SUBST(lt_enable_auto_import)
45 17
46PKG_CHECK_MODULES([EVAS], [evas]) 18### Additional options to configure
47 19
48#######################################
49## Simple X11 build/link 20## Simple X11 build/link
50 21
22## Evas engines
23
51AC_ARG_ENABLE(simple-x11, 24AC_ARG_ENABLE(simple-x11,
52 AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking]), 25 [AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking])],
53 [ want_evas_simple_x11=$enableval ] 26 [want_evas_simple_x11=$enableval]
54) 27)
55 28
56### Software X11 29# Software X11
57EXPEDITE_CHECK_ENGINE([software-x11], [Software X11], "yes") 30EXPEDITE_CHECK_ENGINE([software-x11], [Software X11], "yes")
58 31
59### XRender X11 32# XRender X11
60EXPEDITE_CHECK_ENGINE([xrender-x11], [XRender X11], "yes") 33EXPEDITE_CHECK_ENGINE([xrender-x11], [XRender X11], "yes")
61 34
62### OpenGL X11 35# OpenGL X11
63EXPEDITE_CHECK_ENGINE([opengl-x11], [OpenGL X11], "yes") 36EXPEDITE_CHECK_ENGINE([opengl-x11], [OpenGL X11], "yes")
64 37
65### Software XCB 38# Software XCB
66EXPEDITE_CHECK_ENGINE([software-xcb], [Software XCB], "yes") 39EXPEDITE_CHECK_ENGINE([software-xcb], [Software XCB], "yes")
67 40
68# TODO: Check availability of libs 41# DirectDraw
69### DirectDraw
70EXPEDITE_CHECK_ENGINE([software-ddraw], [Software DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid"]) 42EXPEDITE_CHECK_ENGINE([software-ddraw], [Software DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid"])
43AC_SUBST(ddraw_libs)
71 44
72# TODO: Check availability of libs 45# Direct3D
73### Direct3D
74EXPEDITE_CHECK_ENGINE([direct3d], [Direct3D], "yes", [d3d_libs="-ld3d9 -ld3dx9d"]) 46EXPEDITE_CHECK_ENGINE([direct3d], [Direct3D], "yes", [d3d_libs="-ld3d9 -ld3dx9d"])
47AC_SUBST(d3d_libs)
75 48
76### OpenGL GLEW 49# OpenGL GLEW
77EXPEDITE_CHECK_ENGINE([opengl-glew], [OpenGL Glew], "yes", [glew_libs="-lglew32 -lgdi32"]) 50EXPEDITE_CHECK_ENGINE([opengl-glew], [OpenGL Glew], "yes", [glew_libs="-lglew32 -lgdi32"])
51AC_SUBST(glew_libs)
78 52
79### Software SDL 53# Software SDL
80EXPEDITE_CHECK_ENGINE([software-sdl], [Software SDL], "yes") 54EXPEDITE_CHECK_ENGINE([software-sdl], [Software SDL], "yes")
81 55
82### FB 56# FB
83EXPEDITE_CHECK_ENGINE([fb], [Framebuffer], "yes") 57EXPEDITE_CHECK_ENGINE([fb], [Framebuffer], "yes")
84 58
85### DIRECTFB 59# DIRECTFB
86EXPEDITE_CHECK_ENGINE([directfb], [DirectFB], "yes") 60EXPEDITE_CHECK_ENGINE([directfb], [DirectFB], "yes")
87 61
88### Quartz 62# Quartz
89EXPEDITE_CHECK_ENGINE([quartz], [Quartz], "yes", [quartz_libs="-framework Cocoa -framework ApplicationServices"]) 63EXPEDITE_CHECK_ENGINE([quartz], [Quartz], "yes", [quartz_libs="-framework Cocoa -framework ApplicationServices"])
64AC_SUBST(quartz_libs)
90 65
91### Software 16bit X11 66AM_CONDITIONAL(BUILD_QUARTZ, test "x$have_quartz" = "xyes")
67
68# Software 16bit X11
92EXPEDITE_CHECK_ENGINE([software-16-x11], [Software 16 bits X11], "yes") 69EXPEDITE_CHECK_ENGINE([software-16-x11], [Software 16 bits X11], "yes")
93 70
94# TODO: Check availability of libs 71# 16bit DirectDraw
95### 16bit DirectDraw
96EXPEDITE_CHECK_ENGINE([software-16-ddraw], [Software 16 bits DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid"]) 72EXPEDITE_CHECK_ENGINE([software-16-ddraw], [Software 16 bits DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid"])
73AC_SUBST(ddraw_16_libs)
97 74
98# TODO: Check availability of libs 75# 16bit WinCE
99### 16bit WinCE
100EXPEDITE_CHECK_ENGINE([software-16-wince], [Software 16 bits WinCE], "yes", [wince_16_libs="-laygshell"]) 76EXPEDITE_CHECK_ENGINE([software-16-wince], [Software 16 bits WinCE], "yes", [wince_16_libs="-laygshell"])
77AC_SUBST(wince_16_libs)
78
79### Checks for programs
80
81AC_ISC_POSIX
82m4_ifdef([AC_PROG_OBJC],
83 [AC_PROG_OBJC],
84 [
85 AC_CHECK_TOOL([OBJC], [gcc])
86 AC_SUBST([OBJC])
87 AC_SUBST([OBJCFLAGS])
88 ]
89)
90AC_PROG_CXX
91AC_PROG_CC
92
93
94### Checks for libraries
95
96# Evil library for compilation on Windows
97
98case "$host_os" in
99 mingw32ce*)
100 PKG_CHECK_MODULES([EVIL], [evil])
101 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
102 ;;
103esac
104
105# Evas
106
107PKG_CHECK_MODULES([EVAS], evas)
108
109# Xlib
101 110
102if 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 111if 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
103 AC_PATH_XTRA 112 AC_PATH_XTRA
104 AC_CHECK_HEADERS(X11/Xlib.h X11/Xutil.h, 113 AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h],
105 [ have_x11="yes" ], 114 [have_x11="yes"],
106 [ have_x11="no" ]) 115 [have_x11="no"])
107 if test "x$want_evas_simple_x11" = "xyes"; then 116 if test "x$want_evas_simple_x11" = "xyes"; then
108 x_libs="${x_libs} -lX11 -lXext" 117 x_libs="${x_libs} -lX11 -lXext"
109 else 118 else
110 x_dir=${x_dir:-/usr/X11R6} 119 x_dir=${x_dir:-/usr/X11R6}
111 x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}} 120 x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
112 x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext" 121 x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
113 fi 122 fi
114fi 123fi
115AM_CONDITIONAL(BUILD_X11, test "x$have_x11" = "xyes") 124AM_CONDITIONAL(BUILD_X11, test "x$have_x11" = "xyes")
116 125
126AC_SUBST(x_cflags)
127AC_SUBST(x_libs)
128
129# XCB
130
117if test "x$have_software_xcb" = "xyes"; then 131if test "x$have_software_xcb" = "xyes"; then
118 PKG_CHECK_MODULES([XCB], xcb xcb-keysyms, 132 PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms], [have_software_xcb="yes"], [have_software_xcb="no"])
119 [ have_software_xcb="yes" ],
120 [ have_software_xcb="no" ])
121fi 133fi
122AM_CONDITIONAL(BUILD_XCB, test "x$have_xcb" = "xyes") 134AM_CONDITIONAL(BUILD_XCB, test "x$have_xcb" = "xyes")
123if test "x$have_xcb" = "xyes"; then 135if test "x$have_xcb" = "xyes"; then
124 AC_DEFINE(BUILD_XCB, 1, [build xcb support]) 136 AC_DEFINE(BUILD_XCB, 1, [build xcb support])
125fi 137fi
126 138
139# SDL
140
127if test "x$have_software_sdl" = "xyes"; then 141if test "x$have_software_sdl" = "xyes"; then
128 PKG_CHECK_MODULES([SDL], sdl, 142 PKG_CHECK_MODULES([SDL], [sdl], [have_sdl="yes"], [have_sdl="no"])
129 [ have_sdl="yes" ],
130 [ have_sdl="no" ])
131fi 143fi
132AM_CONDITIONAL(BUILD_SDL, test "x$have_sdl" = "xyes") 144AM_CONDITIONAL(BUILD_SDL, test "x$have_sdl" = "xyes")
133 145
146# DirectFB
147
134if test "x$have_directfb" = "xyes"; then 148if test "x$have_directfb" = "xyes"; then
135 PKG_CHECK_MODULES([DIRECTFB], directfb, 149 PKG_CHECK_MODULES([DIRECTFB], [directfb], [have_directfb="yes"], [have_directfb="no"])
136 [ have_directfb="yes" ],
137 [ have_directfb="no" ])
138fi 150fi
139AM_CONDITIONAL(BUILD_DIRECTFB, test "x$have_directfb" = "xyes") 151AM_CONDITIONAL(BUILD_DIRECTFB, test "x$have_directfb" = "xyes")
140 152
141AM_CONDITIONAL(BUILD_QUARTZ, test "x$have_quartz" = "xyes")
142 153
143AC_SUBST(x_cflags) 154### Checks for header files
144AC_SUBST(x_libs) 155
145AC_SUBST(ddraw_libs) 156
146AC_SUBST(ddraw_16_libs) 157### Checks for types
147AC_SUBST(d3d_libs) 158
148AC_SUBST(wince_16_libs) 159
149AC_SUBST(glew_libs) 160### Checks for structures
150AC_SUBST(quartz_libs) 161
162
163### Checks for compiler characteristics
164
165AM_PROG_CC_STDC
166AC_HEADER_STDC
167AC_C_CONST
168AM_PROG_CC_C_O
169
170WIN32_CFLAGS=""
171case "$host_os" in
172 cegcc*)
173 WIN32_CFLAGS="-mwin32"
174 ;;
175esac
176AC_SUBST(WIN32_CFLAGS)
177
178
179### Checks for linker characteristics
180
181lt_enable_auto_import=""
182case "$host_os" in
183 mingw* | cegcc*)
184 lt_enable_auto_import="-Wl,--enable-auto-import"
185 ;;
186esac
187AC_SUBST(lt_enable_auto_import)
188
189
190### Checks for library functions
191
151 192
152AC_OUTPUT([ 193AC_OUTPUT([
153Makefile 194Makefile