1 dnl Process this file with autoconf to produce a configure script.
3 # get rid of that stupid cache mechanism
6 AC_INIT([expedite], [0.7.2], [enlightenment-devel@lists.sourceforge.net])
8 AC_CONFIG_SRCDIR([configure.ac])
9 AC_CONFIG_HEADERS([config.h])
13 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
19 ### Additional options to configure
21 ## Simple X11 build/link
25 AC_ARG_ENABLE(simple-x11,
26 [AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking])],
27 [want_evas_simple_x11=$enableval]
31 have_software_xlib="no"
32 have_software_xcb="no"
33 EXPEDITE_CHECK_ENGINE([software-x11], [Software X11], "yes")
35 if test "x${have_software_x11}" = "xyes" ; then
36 have_software_xlib=`${PKG_CONFIG} --variable=Xlib evas-software-x11`
37 if test "x${have_software_xlib}" = "xyes" ; then
38 AC_DEFINE(HAVE_EVAS_SOFTWARE_XLIB, 1, [Evas Software Xlib Engine Support])
40 have_software_xcb=`${PKG_CONFIG} --variable=XCB evas-software-x11`
41 if test "x${have_software_xcb}" = "xyes" ; then
42 AC_DEFINE(HAVE_EVAS_SOFTWARE_XCB, 1, [Evas Software XCB Engine Support])
46 AM_CONDITIONAL([BUILD_SOFTWARE_XLIB], [test "x${have_software_xlib}" = "xyes"])
47 AM_CONDITIONAL([BUILD_SOFTWARE_XCB], [test "x${have_software_xcb}" = "xyes"])
50 EXPEDITE_CHECK_ENGINE([xrender-x11], [XRender X11], "yes")
53 EXPEDITE_CHECK_ENGINE([opengl-x11], [OpenGL X11], "yes")
56 EXPEDITE_CHECK_ENGINE([xrender-xcb], [XRender XCB], "yes")
59 EXPEDITE_CHECK_ENGINE([software-gdi], [Software GDI], "yes", [gdi_libs="-lgdi32"])
63 EXPEDITE_CHECK_ENGINE([software-ddraw], [Software DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid -lgdi32"])
67 EXPEDITE_CHECK_ENGINE([direct3d], [Direct3D], "yes", [d3d_libs="-ld3d9 -ld3dx9d -lgdi32"])
71 EXPEDITE_CHECK_ENGINE([software-sdl], [Software SDL], "yes")
74 EXPEDITE_CHECK_ENGINE([opengl-sdl], [OpenGL SDL], "yes")
77 EXPEDITE_CHECK_ENGINE([fb], [Framebuffer], "yes")
80 EXPEDITE_CHECK_ENGINE([directfb], [DirectFB], "yes")
83 EXPEDITE_CHECK_ENGINE([software-16-x11], [Software 16 bits X11], "yes")
86 EXPEDITE_CHECK_ENGINE([software-16-ddraw], [Software 16 bits DirectDraw], "yes", [ddraw_16_libs="-lddraw -ldxguid"])
87 AC_SUBST(ddraw_16_libs)
90 EXPEDITE_CHECK_ENGINE([software-16-wince], [Software 16 bits WinCE], "yes", [wince_16_libs="-laygshell"])
91 AC_SUBST(wince_16_libs)
93 ### Checks for programs
96 m4_ifdef([AC_PROG_OBJC],
99 _AM_DEPENDENCIES(OBJC)
102 AC_CHECK_TOOL([OBJC], [gcc])
104 AC_SUBST([OBJCFLAGS])
113 ### Checks for libraries
115 # Evil library for compilation on Windows
119 PKG_CHECK_MODULES([EVIL], [evil])
120 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
126 PKG_CHECK_MODULES([EINA], eina >= 1.0.0)
130 PKG_CHECK_MODULES([EVAS], evas >= 1.0.0 eet >= 1.4.0)
134 if test "x$have_software_xlib" = "xyes" -o "x$have_software_16_x11" = "xyes" -o "x$have_xrender_x11" = "xyes" -o "x$have_opengl_x11" = "xyes"; then
136 AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h],
139 if test "x$want_evas_simple_x11" = "xyes"; then
140 x_libs="${x_libs} -lX11 -lXext -lXrender"
142 x_dir=${x_dir:-/usr/X11R6}
143 x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
144 x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
147 AM_CONDITIONAL(BUILD_X11, [test "x$have_xlib" = "xyes"])
154 if test "x$have_software_xcb" = "xyes"; then
155 PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms], [have_xcb="yes"], [have_xcb="no"])
157 AM_CONDITIONAL(BUILD_XCB, test "x$have_xcb" = "xyes")
158 if test "x$have_xcb" = "xyes"; then
159 AC_DEFINE(BUILD_XCB, 1, [build xcb support])
164 if test "x$have_software_sdl" = "xyes" -o "x$have_gl_sdl" = "xyes"; then
165 PKG_CHECK_MODULES([SDL], [sdl], [have_sdl="yes"], [have_sdl="no"])
167 AM_CONDITIONAL(BUILD_SDL, test "x$have_sdl" = "xyes")
171 if test "x$have_directfb" = "xyes"; then
172 PKG_CHECK_MODULES([DIRECTFB], [directfb], [have_directfb="yes"], [have_directfb="no"])
174 AM_CONDITIONAL(BUILD_DIRECTFB, test "x$have_directfb" = "xyes")
177 ### Checks for header files
183 ### Checks for structures
186 ### Checks for compiler characteristics
197 WIN32_CFLAGS="-mwin32"
200 AC_SUBST(WIN32_CFLAGS)
204 CXXFLAGS_save="${CXXFLAGS}"
205 CXXFLAGS="${CXXFLAGS} -fno-rtti -fno-exceptions"
207 [AC_LANG_PROGRAM([[]])],
208 [have_cxx_flags="yes"],
209 [have_cxx_flags="no"])
210 AC_MSG_CHECKING([whether the compiler supports -fno-rtti -fno-exceptions])
211 AC_MSG_RESULT([${have_cxx_flags}])
212 CXXFLAGS="${CXXFLAGS_save}"
213 if test "x${have_cxx_flags}" = "xyes" ; then
214 EXPEDITE_CXXFLAGS="-fno-rtti -fno-exceptions"
217 AC_SUBST(EXPEDITE_CXXFLAGS)
220 ### Checks for linker characteristics
222 lt_enable_auto_import=""
225 lt_enable_auto_import="-Wl,--enable-auto-import"
228 AC_SUBST(lt_enable_auto_import)
231 ### Checks for library functions
242 echo " $PACKAGE $VERSION"
245 echo " Software X11.................: ${have_software_x11} (Xlib: ${have_software_xlib}) (XCB: ${have_software_xcb})"
246 echo " X Render X11.................: ${have_xrender_x11}"
247 echo " Open GL X11..................: ${have_opengl_x11}"
248 echo " X Render XCB.................: ${have_xrender_xcb}"
249 echo " Software GDI.................: ${have_software_gdi}"
250 echo " Software DirectDraw..........: ${have_software_ddraw}"
251 echo " Direct3D.....................: ${have_direct3d}"
252 echo " Software SDL.................: ${have_software_sdl}"
253 echo " Open GL SDL..................: ${have_opengl_sdl}"
254 echo " FB...........................: ${have_fb}"
255 echo " DirectFB.....................: ${have_directfb}"
256 echo " Software X11 16 bits.........: ${have_software_16_x11}"
257 echo " Software DirectDraw 16 bits..: ${have_software_16_ddraw}"
258 echo " Software WinCE 16 bits.......: ${have_software_16_wince}"
260 echo " Installation:"
261 echo " prefix.......................: ${prefix}"