summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Wehrfritz <peter.wehrfritz@web.de>2008-09-30 18:07:29 +0000
committerPeter Wehrfritz <peter.wehrfritz@web.de>2008-09-30 18:07:29 +0000
commit9e60f166245e127f6b71e13a780a8079bcfc23b9 (patch)
tree4d181e5c1823ee8f0474d15c179eb49acee8c823 /configure.ac
parente11761cb406c3c3b1bddfebcdeb12909a15d8eea (diff)
configure.in -> configure.ac
SVN revision: 36364
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac174
1 files changed, 174 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..88ea77f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,174 @@
1dnl Process this file with autoconf to produce a configure script.
2
3# get rid of that stupid cache mechanism
4rm -f config.cache
5
6AC_INIT(expedite, 0.6.0, enlightenment-devel@lists.sourceforge.net)
7AC_PREREQ(2.52)
8AC_CONFIG_SRCDIR(configure.ac)
9AC_CANONICAL_BUILD
10AC_CANONICAL_HOST
11
12AM_INIT_AUTOMAKE(1.6 dist-bzip2)
13AM_CONFIG_HEADER(config.h)
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
28
29WIN32_CFLAGS=""
30lt_enable_auto_import=""
31case "$host_os" in
32 cegcc)
33 WIN32_CFLAGS="-mwin32"
34 lt_enable_auto_import="-Wl,--enable-auto-import"
35 ;;
36esac
37AC_SUBST(WIN32_CFLAGS)
38AC_SUBST(lt_enable_auto_import)
39
40PKG_CHECK_MODULES([EVAS], evas)
41
42#######################################
43## Simple X11 build/link
44
45AC_ARG_ENABLE(simple-x11,
46 AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking]),
47 [ want_evas_simple_x11=$enableval ]
48)
49
50### Software X11
51EXPEDITE_CHECK_ENGINE([software-x11], [Software X11], "yes")
52
53### XRender X11
54EXPEDITE_CHECK_ENGINE([xrender-x11], [XRender X11], "yes")
55
56### OpenGL X11
57EXPEDITE_CHECK_ENGINE([opengl-x11], [OpenGL X11], "yes")
58
59### Software XCB
60EXPEDITE_CHECK_ENGINE([software-xcb], [Software XCB], "yes")
61
62# TODO: Check availability of libs
63### DirectDraw
64EXPEDITE_CHECK_ENGINE([software-ddraw], [Software DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid"])
65
66# TODO: Check availability of libs
67### Direct3D
68EXPEDITE_CHECK_ENGINE([direct3d], [Direct3D], "yes", [d3d_libs="-ld3d9 -ld3dx9d"])
69
70### OpenGL GLEW
71EXPEDITE_CHECK_ENGINE([opengl-glew], [OpenGL Glew], "yes", [glew_libs="-lglew32 -lgdi32"])
72
73### Software SDL
74EXPEDITE_CHECK_ENGINE([software-sdl], [Software SDL], "yes")
75
76### FB
77EXPEDITE_CHECK_ENGINE([fb], [Framebuffer], "yes")
78
79### DIRECTFB
80EXPEDITE_CHECK_ENGINE([directfb], [DirectFB], "yes")
81
82### Quartz
83EXPEDITE_CHECK_ENGINE([quartz], [Quartz], "yes", [quartz_libs="-framework Cocoa -framework ApplicationServices"])
84
85### Software 16bit X11
86EXPEDITE_CHECK_ENGINE([software-16-x11], [Software 16 bits X11], "yes")
87
88# TODO: Check availability of libs
89### 16bit DirectDraw
90EXPEDITE_CHECK_ENGINE([software-16-ddraw], [Software 16 bits DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid"])
91
92# TODO: Check availability of libs
93### 16bit WinCE
94EXPEDITE_CHECK_ENGINE([software-16-wince], [Software 16 bits WinCE], "yes", [wince_16_libs="-laygshell"])
95
96if 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
97 AC_PATH_XTRA
98 AC_CHECK_HEADERS(X11/Xlib.h X11/Xutil.h,
99 [ have_x11="yes" ],
100 [ have_x11="no" ])
101 if test "x$want_evas_simple_x11" = "xyes"; then
102 x_libs="${x_libs} -lX11 -lXext"
103 else
104 x_dir=${x_dir:-/usr/X11R6}
105 x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
106 x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
107 fi
108fi
109AM_CONDITIONAL(BUILD_X11, test "x$have_x11" = "xyes")
110
111if test "x$have_software_xcb" = "xyes"; then
112 PKG_CHECK_MODULES([XCB], xcb xcb-keysyms,
113 [ have_software_xcb="yes" ],
114 [ have_software_xcb="no" ])
115fi
116AM_CONDITIONAL(BUILD_XCB, test "x$have_xcb" = "xyes")
117if test "x$have_xcb" = "xyes"; then
118 AC_DEFINE(BUILD_XCB, 1, [build xcb support])
119fi
120
121if test "x$have_software_sdl" = "xyes"; then
122 PKG_CHECK_MODULES([SDL], sdl,
123 [ have_sdl="yes" ],
124 [ have_sdl="no" ])
125fi
126AM_CONDITIONAL(BUILD_SDL, test "x$have_sdl" = "xyes")
127
128if test "x$have_directfb" = "xyes"; then
129 PKG_CHECK_MODULES([DIRECTFB], directfb,
130 [ have_directfb="yes" ],
131 [ have_directfb="no" ])
132fi
133AM_CONDITIONAL(BUILD_DIRECTFB, test "x$have_directfb" = "xyes")
134
135AM_CONDITIONAL(BUILD_QUARTZ, test "x$have_quartz" = "xyes")
136
137AC_SUBST(x_cflags)
138AC_SUBST(x_libs)
139AC_SUBST(ddraw_libs)
140AC_SUBST(ddraw_16_libs)
141AC_SUBST(d3d_libs)
142AC_SUBST(wince_16_libs)
143AC_SUBST(glew_libs)
144AC_SUBST(quartz_libs)
145
146AC_OUTPUT([
147Makefile
148src/Makefile
149src/bin/Makefile
150data/Makefile
151])
152
153echo
154echo " $PACKAGE $VERSION"
155echo
156echo " Engines:"
157echo " Software X11.................: ${have_software_x11}"
158echo " X Render X11.................: ${have_xrender_x11}"
159echo " Open GL X11..................: ${have_opengl_x11}"
160echo " Software XCB.................: ${have_software_xcb}"
161echo " Software DirectDraw..........: ${have_software_ddraw}"
162echo " Direct3D.....................: ${have_direct3d}"
163echo " Open GL Glew.................: ${have_opengl_glew}"
164echo " Software SDL.................: ${have_software_sdl}"
165echo " FB...........................: ${have_fb}"
166echo " DirectFB.....................: ${have_directfb}"
167echo " Quartz.......................: ${have_quartz}"
168echo " Software X11 16 bits.........: ${have_software_16_x11}"
169echo " Software DirectDraw 16 bits..: ${have_software_16_ddraw}"
170echo " Software WinCE 16 bits.......: ${have_software_16_wince}"
171echo
172echo " Installation:"
173echo " prefix.......................: ${prefix}"
174echo