1 m4_define([pkg_version], [1.0.0])
2 dnl m4_define([pkg_revision], [901])
3 m4_define([pkg_version], m4_ifdef([pkg_revision], [pkg_version.pkg_revision], [pkg_version]))
4 m4_define([rpm_revision], m4_ifdef([pkg_revision], [0.`date '+%y%m%d'`], [1]))
6 AC_INIT([e16], [pkg_version], [enlightenment-devel@lists.sourceforge.net])
7 AM_INIT_AUTOMAKE([foreign])
9 AC_SUBST(E_RPM_REVISION, [rpm_revision])
11 # reasonable guesses for where stuff is installed
12 if test "x$prefix" = "xNONE"; then
13 prefix=$ac_default_prefix
15 if test "x$exec_prefix" = "xNONE"; then
31 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
32 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
33 define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
42 AC_CHECK_HEADERS(alloca.h locale.h stdarg.h wctype.h)
50 AC_CHECK_SIZEOF(int, 4)
51 AC_CHECK_SIZEOF(long, 4)
52 AC_CHECK_SIZEOF(wchar_t, 4)
54 AC_CHECK_FUNCS(snprintf)
55 AM_CONDITIONAL(USE_ESNPRINTF, test "x$ac_cv_func_snprintf" != "xyes")
56 AC_CHECK_FUNCS(strcasecmp strcasestr)
57 AC_CHECK_FUNCS(setenv unsetenv)
58 AC_CHECK_FUNCS(strdup strndup)
60 AC_CHECK_FUNCS(blumfrub)
61 AC_CHECK_FUNCS(buckets_of_erogenous_nym)
62 AC_CHECK_FUNCS(buttox)
67 AM_GNU_GETTEXT([external])
68 AM_GNU_GETTEXT_VERSION([0.12.1])
70 AC_ARG_ENABLE(hints-gnome,
71 [ --enable-hints-gnome compile with GNOME(<2.0) hints support @<:@default=no@:>@],,
72 enable_hints_gnome=no)
74 if test "x$enable_hints_gnome" = "xyes"; then
75 AC_DEFINE(ENABLE_GNOME, 1, [GNOME(<2.0) Hints])
77 AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_hints_gnome" = "xyes")
80 [ --enable-sound compile with sound support @<:@default=yes@:>@],,
82 if test "x$enable_sound" = "xyes"; then
83 AC_ARG_ENABLE(sound_pulse,
84 [ --enable-sound-pulse compile with PulseAudio sound support @<:@default=no@:>@],,
85 enable_sound_pulse=no)
86 AC_ARG_ENABLE(sound_esound,
87 [ --enable-sound-esound compile with EsounD sound support @<:@default=yes@:>@],,
88 enable_sound_esound=yes)
92 if test "x$enable_sound_pulse" = "xyes"; then
93 PKG_CHECK_MODULES(PA, libpulse,, enable_sound_pulse=no)
95 if test "x$enable_sound_pulse" = "xyes"; then
96 AC_DEFINE(HAVE_SOUND, 1, [Sound support])
97 AC_DEFINE(HAVE_SOUND_PA, 1, [PulseAudio sound support])
98 AC_DEFINE(USE_SOUND_LOADER_AUDIOFILE, 1, [Use audiofile sound loader])
99 PKG_CHECK_MODULES(AUDIOFILE, audiofile,,)
100 enable_sound=pulseaudio
101 enable_sound_esound=no
102 PA_LIBS="$PA_LIBS $AUDIOFILE_LIBS"
104 AM_CONDITIONAL(USE_LIBPA, test "x$enable_sound_pulse" = "xyes")
106 if test "x$enable_sound_esound" = "xyes"; then
107 AM_PATH_ESD(0.2.17,,[
108 enable_sound_esound=no
109 AC_MSG_WARN([EsounD sound support was requested but not found.])
111 AC_CHECK_HEADERS(audiofile.h,, enable_sound_esound=no)
113 if test "x$enable_sound_esound" = "xyes"; then
114 AC_DEFINE(HAVE_SOUND, 1, [Sound support])
115 AC_DEFINE(HAVE_SOUND_ESD, 1, [EsounD sound support])
116 AC_DEFINE(USE_SOUND_LOADER_AUDIOFILE, 1, [Use audiofile sound loader])
119 AM_CONDITIONAL(USE_LIBESD, test "x$enable_sound_esound" = "xyes")
121 # Save CPPFLAGS/LDFLAGS and add X_... to each
122 SAVE_CPPFLAGS="$CPPFLAGS"
123 SAVE_LDFLAGS="$LDFLAGS"
124 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
125 LDFLAGS="$X_LIBS $LDFLAGS"
127 PKG_CHECK_MODULES(IMLIB2, imlib2 >= 1.2.0, have_good_imlib2=yes)
128 AC_CHECK_LIB(Imlib2, imlib_context_set_mask_alpha_threshold,
129 AC_DEFINE(HAVE_IMLIB_CONTEXT_SET_MASK_ALPHA_THRESHOLD, 1,
130 [Imlib2 has imlib_context_set_mask_alpha_threshold]),,
132 AC_CHECK_LIB(Imlib2, imlib_context_disconnect_display,
133 AC_DEFINE(HAVE_IMLIB_CONTEXT_DISCONNECT_DISPLAY, 1,
134 [Imlib2 has imlib_context_disconnect_display]),,
138 [ --enable-sm compile with session management support @<:@default=yes@:>@],,
140 if test "x$enable_sm" = "xyes"; then
141 AC_CHECK_HEADERS(X11/SM/SMlib.h,, enable_sm=no)
142 AC_CHECK_LIB(SM, SmcOpenConnection, SM_LIBS="-lSM -lICE", enable_sm=no)
145 if test "x$enable_sm" = "xyes"; then
146 AC_DEFINE(USE_SM, 1, [Session management support])
150 [ --enable-pango compile with pango-xft support @<:@default=no@:>@],,
152 if test "x$enable_pango" = "xyes"; then
153 PKG_CHECK_MODULES(PANGO, pangoxft, AC_DEFINE(USE_PANGO, 1, [pango-xft support]), enable_pango=no)
155 AM_CONDITIONAL(USE_LIBPANGO, test "x$enable_pango" = "xyes")
158 [ --enable-xft compile with Xft support @<:@default=yes@:>@],,
160 if test "x$enable_xft" = "xyes"; then
161 PKG_CHECK_MODULES(XFT, xft, AC_DEFINE(USE_XFT, 1, [Xft support]), enable_xft=no)
163 AM_CONDITIONAL(USE_LIBXFT, test "x$enable_xft" = "xyes")
166 [ --enable-ecore use ecore functions (for testing only - DO NOT USE!) @<:@default=no@:>@],,
168 if test "x$enable_ecore" = "xyes"; then
169 PKG_CHECK_MODULES(ECORE, ecore ecore-x,
170 AC_DEFINE(USE_ECORE, 1, [Use libecore])
171 AC_DEFINE(USE_ECORE_X, 1, [Use libecore_x]),
175 # Is this reasonably correct?
177 [ --enable-glx compile with GLX support (experimental) @<:@default=no@:>@],,
179 if test "x$enable_glx" = "xyes"; then
180 AC_CHECK_HEADERS(GL/gl.h GL/glu.h GL/glx.h, , AC_MSG_ERROR([Cannot find GLX headers]))
181 AC_CHECK_LIB(GL, glXCreateNewContext,
183 AC_DEFINE(USE_GLX, 1, [GLX support])
184 GLX_LIBS="-lGL -lGLU"
186 AC_MSG_ERROR([Cannot find GLX libraries])
188 AC_CHECK_LIB(GL, glXBindTexImageEXT,
189 AC_DEFINE(HAVE_GLX_glXBindTexImageEXT, 1, [glXBindTexImageEXT is available]))
192 AM_CONDITIONAL(ENABLE_GLX, test "x$enable_glx" = "xyes")
194 AC_CHECK_LIB(Xext, XShapeQueryExtension,
195 E_X_LIBS="-lXext $E_X_LIBS",
196 AC_MSG_ERROR([Shape support is required but was not found]),
199 AC_ARG_ENABLE(xinerama,
200 [ --enable-xinerama compile with xinerama support @<:@default=yes@:>@],,
202 if test "x$enable_xinerama" = "xyes"; then
203 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
204 AC_DEFINE(USE_XINERAMA, 1, [Xinerama support])
205 XINERAMA_LIBS="-lXinerama",
207 AC_MSG_WARN([Xinerama support was requested but not found]),
210 AC_SUBST(XINERAMA_LIBS)
213 [ --enable-zoom compile with zoom support @<:@default=yes@:>@],,
215 if test "x$enable_zoom" = "xyes"; then
216 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
217 AC_DEFINE(WITH_ZOOM, 1, [Zoom Support])
218 E_X_LIBS="-lXxf86vm $E_X_LIBS",
220 AC_MSG_WARN([Zoom support was requested but not found]),
225 [ --enable-xsync compile with SYNC support @<:@default=yes@:>@],,
227 if test "x$enable_xsync" = "xyes"; then
228 AC_CHECK_LIB(Xext, XSyncQueryExtension,
229 AC_DEFINE(USE_XSYNC, 1, [SYNC support]),
231 AC_MSG_WARN([Sync support was requested but not found]),
235 AC_ARG_ENABLE(xscrnsaver,
236 [ --enable-xscrnsaver compile with ScreenSaver support (experimental/not useful) @<:@default=no@:>@],,
237 enable_xscrnsaver=no)
238 if test "x$enable_xscrnsaver" = "xyes"; then
239 AC_CHECK_LIB(Xss, XScreenSaverQueryExtension,
240 AC_DEFINE(USE_XSCREENSAVER, 1, [ScreenSaver support])
241 E_X_LIBS="-lXss $E_X_LIBS",
243 AC_MSG_WARN([ScreenSaver support was requested but not found]),
247 AC_ARG_ENABLE(xrandr,
248 [ --enable-xrandr compile with RandR support @<:@default=yes@:>@],,
250 if test "x$enable_xrandr" = "xyes"; then
251 AC_CHECK_LIB(Xrandr, XRRQueryExtension,
252 AC_DEFINE(USE_XRANDR, 1, [RandR support])
253 E_X_LIBS="-lXrandr -lXrender $E_X_LIBS",
255 AC_MSG_WARN([RandR support was requested but not found]),
256 -lXrender -lXext -lX11)
257 AC_CHECK_HEADERS(X11/extensions/Xrandr.h,,,[#include <X11/Xlib.h>])
260 # FIXME - Do this properly
261 AC_ARG_ENABLE(composite,
262 [ --enable-composite compile with Composite support @<:@default=yes@:>@],,
263 enable_composite=yes)
264 if test "x$enable_composite" = "xyes"; then
265 AC_CHECK_LIB(Xcomposite, XCompositeQueryExtension,
266 AC_DEFINE(USE_COMPOSITE, 1, [Composite support])
267 E_X_LIBS="-lXcomposite -lXdamage -lXfixes -lXrender $E_X_LIBS",
270 AC_CHECK_HEADERS(X11/extensions/Xcomposite.h ,, enable_composite=no, [#include <X11/Xlib.h>])
271 AC_CHECK_HEADERS(X11/extensions/Xdamage.h ,, enable_composite=no, [#include <X11/Xlib.h>])
272 AC_CHECK_HEADERS(X11/extensions/Xfixes.h ,, enable_composite=no, [#include <X11/Xlib.h>])
273 AC_CHECK_HEADERS(X11/extensions/Xrender.h ,, enable_composite=no, [#include <X11/Xlib.h>])
274 if test "x$enable_composite" != "xyes"; then
275 AC_MSG_WARN([Composite support was requested but required component was not found])
278 AM_CONDITIONAL(ENABLE_COMPOSITE, test "x$enable_composite" = "xyes")
281 [ --enable-dbus compile with D-Bus support (experimental) @<:@default=no@:>@],,
283 if test "x$enable_dbus" = "xyes"; then
284 PKG_CHECK_MODULES(DBUS, dbus-1, AC_DEFINE(USE_DBUS, 1, [dbus support]), enable_dbus=no)
286 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
288 AC_CHECK_LIB(Fridge,mass_quantities_of_bass_ale)
289 AC_CHECK_LIB(Fridge,mass_quantities_of_any_ale,, [
290 echo "Warning: No ales were found in your refrigerator."
291 echo " We highly suggest that you rectify this situation immediately."
294 # Restore CPPFLAGS/LDFLAGS
295 CPPFLAGS="$SAVE_CPPFLAGS"
296 LDFLAGS="$SAVE_LDFLAGS"
298 AC_ARG_ENABLE(roothacklib,
299 [ --enable-roothacklib build window mode helper library @<:@default=yes@:>@],,
300 enable_roothacklib=yes)
301 if test "x$enable_roothacklib" = "xyes"; then
302 AC_CHECK_LIB(dl, dlopen, DLOPEN_LIBS=-ldl, enable_roothacklib=no)
303 AC_SUBST(DLOPEN_LIBS)
305 if test "x$enable_roothacklib" = "xyes"; then
306 AC_DEFINE(USE_ROOTHACKLIB, 1, [Use window mode helper library])
308 AM_CONDITIONAL(BUILD_ROOTHACKLIB, test "x$enable_roothacklib" = "xyes")
310 AC_ARG_ENABLE(modules,
311 [ --enable-modules enable support for loadable modules @<:@default=no@:>@],,
313 if test "x$enable_modules" = "xyes"; then
314 AC_CHECK_LIB(dl, dlopen, DLOPEN_LIBS=-ldl, enable_modules=no)
315 AC_SUBST(DLOPEN_LIBS)
317 if test "x$enable_modules" = "xyes"; then
318 AC_DEFINE(USE_MODULES, 1, [Loadable module support])
320 AM_CONDITIONAL(BUILD_MODULES, test "x$enable_modules" = "xyes")
322 dnl Set default visibility to hidden (only useful with --enable-modules)
323 AC_ARG_ENABLE(visibility-hiding,
324 [ --enable-visibility-hiding enable visibility hiding @<:@default=no@:>@],,
325 enable_visibility_hiding=no
327 if test "x$enable_visibility_hiding" = xyes ; then
328 CPPFLAGS="$CPPFLAGS -fvisibility=hidden"
331 AC_ARG_ENABLE(dialogs,
332 [ --enable-dialogs enable support for configuration dialogs @<:@default=yes@:>@],,
334 if test "x$enable_dialogs" = "xyes"; then
335 AC_DEFINE(ENABLE_DIALOGS, 1, [Configuration dialog support])
339 [ --enable-docs install html docs @<:@default=yes@:>@],,
341 if test "x$enable_docs" = "xyes"; then
342 AC_CHECK_PROG(XMLTO, xmlto, xmlto)
343 if test "x$XMLTO" = "x"; then
347 AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])
349 AC_ARG_ENABLE(gcc-cpp,
350 [ --enable-gcc-cpp compile everything as if it were C++ @<:@default=no@:>@],,
352 if test "x$enable_gcc_cpp" = "xyes"; then
354 CPPFLAGS="$CPPFLAGS -x c++"
355 AC_C_WARNFLAGS([cpp])
360 AC_DEFINE(_GNU_SOURCE, 1, [Enable extensions])
362 AC_DEFINE(USE_EXT_INIT_WIN, 1, [Use external init window during restart])
364 AC_DEFINE(ENABLE_DESKRAY, 0, [Enable deskrays (not functional)])
366 AC_DEFINE(ENABLE_TRANSPARENCY, 1, [Enable pseudotransparency])
367 AC_DEFINE(ENABLE_THEME_TRANSPARENCY, 1, [Enable adjusting theme element pseudotransparency])
371 AM_CONFIG_HEADER(config.h)
392 if test "x$have_good_imlib2" != "xyes"; then
393 echo "***************************************************************"
394 echo "*** WARNING: imlib2 >= 1.2.0 was not detected ***"
395 echo "*** WARNING: If you indeed do not have this, expect trouble ***"
396 echo "***************************************************************"
400 echo "------------------------------------------------------------------------"
401 echo "$PACKAGE Version $VERSION"
402 echo "------------------------------------------------------------------------"
404 echo "Configuration summary"
407 echo " Localisation ................. $USE_NLS"
408 echo " Sound ........................ $enable_sound"
409 echo " Old GNOME hints .............. $enable_hints_gnome"
410 echo " Session management ........... $enable_sm"
411 echo " Zoom ......................... $enable_zoom"
412 echo " Pango ........................ $enable_pango"
413 echo " Xft .......................... $enable_xft"
414 echo " Xinerama ..................... $enable_xinerama"
415 echo " RandR ........................ $enable_xrandr"
416 echo " Sync ......................... $enable_xsync"
417 echo " Composite .................... $enable_composite"
418 echo " Modules ...................... $enable_modules"
419 echo " Visibility hiding ............ $enable_visibility_hiding (only useful with modules)"
420 echo " Window mode helper library ... $enable_roothacklib"
421 echo " Dialogs ...................... $enable_dialogs"
423 echo "Experimental options - DO NOT USE unless you know what you are doing"
424 echo " Compile with ecore/ecore_x ... $enable_ecore"
425 echo " GLX .......................... $enable_glx"
426 echo " ScreenSaver .................. $enable_xscrnsaver"
427 echo " D-Bus ........................ $enable_dbus"
429 echo "Installation path .............. $prefix"
430 echo " Install HTML docs ............ $enable_docs"
432 echo "Compilation .................... make"
433 echo "Installation ................... make install"