summaryrefslogtreecommitdiff
path: root/legacy/eina/configure.ac
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-06-29 06:49:08 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-06-29 06:49:08 +0000
commit8aa31b9de492458256fcc3b392139d846f357209 (patch)
treeeede23179f52cb14cfa4db605eeb05f767ea15ef /legacy/eina/configure.ac
parentcbaf0ff3b521a72c86a8ac8a5460023383f3bc06 (diff)
Eina: reorganise a bit the autotools. Please report any problem
SVN revision: 73023
Diffstat (limited to 'legacy/eina/configure.ac')
-rw-r--r--legacy/eina/configure.ac159
1 files changed, 74 insertions, 85 deletions
diff --git a/legacy/eina/configure.ac b/legacy/eina/configure.ac
index 4b4ec62698..864eaa16af 100644
--- a/legacy/eina/configure.ac
+++ b/legacy/eina/configure.ac
@@ -68,27 +68,30 @@ AC_CANONICAL_HOST
68 68
69requirements_pc_eina="" 69requirements_pc_eina=""
70 70
71have_wince="no"
72have_win32="no"
71case "$host_os" in 73case "$host_os" in
72 mingw32ce*) 74 mingw32ce*)
75 have_win32="yes"
76 have_wince="yes"
73 MODULE_ARCH="$host_os-$host_cpu" 77 MODULE_ARCH="$host_os-$host_cpu"
78 MODULE_EXT=".dll"
74 ;; 79 ;;
75 *)
76 MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
77 ;;
78esac
79AC_SUBST(MODULE_ARCH)
80AC_DEFINE_UNQUOTED(MODULE_ARCH, "${MODULE_ARCH}", "Module architecture")
81
82case "$host_os" in
83 mingw*) 80 mingw*)
81 have_win32="yes"
82 MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
84 MODULE_EXT=".dll" 83 MODULE_EXT=".dll"
85 ;; 84 ;;
86 *) 85 *)
86 MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
87 MODULE_EXT=".so" 87 MODULE_EXT=".so"
88 ;; 88 ;;
89esac 89esac
90 90AM_CONDITIONAL([EINA_HAVE_WINCE], [test "x$have_wince" = "xyes"])
91AC_DEFINE_UNQUOTED(SHARED_LIB_SUFFIX, "${MODULE_EXT}", [Suffix for shared objects]) 91AM_CONDITIONAL([EINA_HAVE_WIN32], [test "x$have_win32" = "xyes"])
92AC_SUBST([MODULE_ARCH])
93AC_DEFINE_UNQUOTED([MODULE_ARCH], ["${MODULE_ARCH}"], ["Module architecture"])
94AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["${MODULE_EXT}"], [Suffix for shared objects])
92 95
93EFL_CHECK_CPU_MMX([have_mmx="yes"], [have_mmx="no"]) 96EFL_CHECK_CPU_MMX([have_mmx="yes"], [have_mmx="no"])
94EFL_CHECK_CPU_SSE([have_sse="yes"], [have_sse="no"]) 97EFL_CHECK_CPU_SSE([have_sse="yes"], [have_sse="no"])
@@ -268,25 +271,75 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
268 271
269### Checks for libraries 272### Checks for libraries
270 273
274## Compatibility layers
275
276# Evil library for compilation on Windows
277
278EFL_EINA_BUILD=""
279case "$host_os" in
280 mingw*)
281 PKG_CHECK_EXISTS([evil >= 1.1.0])
282 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil package is installed])
283 requirements_pc_eina="${requirements_pc_eina} evil"
284 EFL_EINA_BUILD="-DEFL_EINA_BUILD"
285 ;;
286esac
287AC_SUBST([EFL_EINA_BUILD])
288
289# Escape library for compilation on Playstation 3
290
291case "$host_vendor" in
292 ps3*)
293 PKG_CHECK_EXISTS([escape])
294 AC_DEFINE([HAVE_ESCAPE], [1], [Set to 1 if Escape package is installed])
295 requirements_pc_eina="${requirements_pc_eina} escape"
296 ;;
297esac
298
299# Exotic library for copilation on Coyote
300
301PKG_CHECK_EXISTS([exotic],
302 [
303 enable_exotic="yes"
304 AC_DEFINE([HAVE_EXOTIC_H], [1], [Define to 1 if you have Exotic.])
305 EINA_CONFIGURE_HAVE_EXOTIC="#define EINA_HAVE_EXOTIC"
306 requirements_pc_eina="exotic ${requirements_pc_eina}"
307 ],
308 [enable_exotic="no"])
309
310AM_CONDITIONAL([EINA_HAVE_EXOTIC], [test "x${enable_exotic}" = "xyes"])
311AC_SUBST([EINA_CONFIGURE_HAVE_EXOTIC])
312
313if ! test "x${requirements_pc_eina}" = "x" ; then
314 PKG_CHECK_MODULES([EINA], [${requirements_pc_eina}])
315fi
316
317## Options
318
271# Valgrind 319# Valgrind
272want_valgrind="auto"
273have_valgrind="no"
274 320
275AC_ARG_ENABLE([valgrind], 321AC_ARG_ENABLE([valgrind],
276 [AC_HELP_STRING([--enable-valgrind], [improve valgrind support by hinting it of our memory usages, having it to report proper mempool leaks.])], 322 [AC_HELP_STRING([--enable-valgrind], [improve valgrind support by hinting it of our memory usages, having it to report proper mempool leaks.])],
277 [want_valgrind=$enableval]) 323 [
324 if test "x${enableval}" = "xyes" ; then
325 want_valgrind="yes"
326 else
327 want_valgrind="no"
328 fi
329 ],
330 [want_valgrind="auto"])
278 331
279AC_MSG_CHECKING([whether to enable build with valgrind]) 332AC_MSG_CHECKING([whether to enable build with valgrind])
280AC_MSG_RESULT([${want_valgrind}]) 333AC_MSG_RESULT([${want_valgrind}])
281 334
282if test "x${want_valgrind}" = "xyes" || test "x${want_valgrind}" = "xauto"; then 335if test "x${want_valgrind}" = "xyes" || test "x${want_valgrind}" = "xauto"; then
283 PKG_CHECK_MODULES([VALGRIND], 336 PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0],
284 [valgrind >= 2.4.0],
285 [ 337 [
286 requirements_pc_eina="valgrind ${requirements_pc_eina}"
287 have_valgrind="yes" 338 have_valgrind="yes"
339 requirements_pc_eina="valgrind ${requirements_pc_eina}"
288 ], 340 ],
289 [ 341 [
342 have_valgrind="no"
290 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled]) 343 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
291 if test "x${want_valgrind}" = "xyes"; then 344 if test "x${want_valgrind}" = "xyes"; then
292 AC_MSG_ERROR([Valgrind >= 2.4.0 is required]) 345 AC_MSG_ERROR([Valgrind >= 2.4.0 is required])
@@ -296,48 +349,7 @@ else
296 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled]) 349 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
297fi 350fi
298 351
299 352## Modules
300# Evil library for compilation on Windows
301
302EFL_EINA_BUILD=""
303case "$host_os" in
304 mingw*)
305 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
306 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if evil package is installed])
307 requirements_pc_eina="${requirements_pc_eina} evil"
308 EFL_EINA_BUILD="-DEFL_EINA_BUILD"
309 ;;
310esac
311AC_SUBST([EFL_EINA_BUILD])
312
313# Checks for portability layer
314
315PKG_CHECK_MODULES([EXOTIC],
316 [exotic],
317 [enable_exotic="yes"],
318 [enable_exotic="no"])
319
320if test "x${enable_exotic}" = "xyes"; then
321 requirements_pc_eina="exotic ${requirements_pc_eina}"
322 EINA_CFLAGS="${EINA_CFLAGS} ${EXOTIC_CFLAGS}"
323 EINA_LIBS="${EXOTIC_LIBS}"
324
325 EINA_CONFIGURE_HAVE_EXOTIC="#define EINA_HAVE_EXOTIC"
326 AC_DEFINE([HAVE_EXOTIC_H], [1], [Define to 1 if you have Exotic.])
327fi
328AM_CONDITIONAL([EINA_HAVE_EXOTIC], [test "x${enable_exotic}" = "xyes"])
329AC_SUBST([EINA_CONFIGURE_HAVE_EXOTIC])
330
331case "$host_vendor" in
332 ps3*)
333 PKG_CHECK_MODULES([ESCAPE], [escape])
334 AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if Escape package is installed])
335 requirements_pc_eina="${requirements_pc_eina} escape"
336 EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}"
337 ;;
338esac
339
340AC_SUBST([EINA_CFLAGS])
341 353
342# Check ememoa memory pool library 354# Check ememoa memory pool library
343 355
@@ -353,7 +365,7 @@ AC_ARG_ENABLE([ememoa],
353 [enable_ememoa="yes"]) 365 [enable_ememoa="yes"])
354 366
355AC_MSG_CHECKING([whether to use ememoa for memory pool]) 367AC_MSG_CHECKING([whether to use ememoa for memory pool])
356AC_MSG_RESULT([$enable_ememoa]) 368AC_MSG_RESULT([${enable_ememoa}])
357 369
358if test "x${enable_ememoa}" = "xyes" ; then 370if test "x${enable_ememoa}" = "xyes" ; then
359 PKG_CHECK_MODULES([EMEMOA], 371 PKG_CHECK_MODULES([EMEMOA],
@@ -362,6 +374,8 @@ if test "x${enable_ememoa}" = "xyes" ; then
362 [enable_ememoa="no"]) 374 [enable_ememoa="no"])
363fi 375fi
364 376
377## Examples
378
365PKG_CHECK_MODULES([ECORE_EVAS], 379PKG_CHECK_MODULES([ECORE_EVAS],
366 [ecore-evas ecore evas], 380 [ecore-evas ecore evas],
367 [build_tiler_example="yes"], 381 [build_tiler_example="yes"],
@@ -424,22 +438,6 @@ AC_C_INLINE
424AC_PROG_CC_STDC 438AC_PROG_CC_STDC
425EFL_ATTRIBUTE_UNUSED 439EFL_ATTRIBUTE_UNUSED
426 440
427have_wince="no"
428have_win32="no"
429case "$host_os" in
430 mingw32ce*)
431 EINA_CFLAGS="${EVIL_CFLAGS}"
432 have_win32="yes"
433 have_wince="yes"
434 ;;
435 mingw*)
436 EINA_CFLAGS="${EVIL_CFLAGS}"
437 have_win32="yes"
438 ;;
439esac
440AM_CONDITIONAL([EINA_HAVE_WINCE], [test "x$have_wince" = "xyes"])
441AM_CONDITIONAL([EINA_HAVE_WIN32], [test "x$have_win32" = "xyes"])
442
443m4_ifdef([v_mic], 441m4_ifdef([v_mic],
444 [ 442 [
445 EFL_COMPILER_FLAG([-Wall]) 443 EFL_COMPILER_FLAG([-Wall])
@@ -451,21 +449,12 @@ EFL_COMPILER_FLAG([-Wshadow])
451EFL_CHECK_PATH_MAX 449EFL_CHECK_PATH_MAX
452 450
453### Checks for linker characteristics 451### Checks for linker characteristics
454EINA_LIBS=
455lt_enable_auto_import="" 452lt_enable_auto_import=""
456case "${host_os}" in 453case "${host_os}" in
457 mingw*) 454 mingw*)
458 EINA_LIBS="${EINA_LIBS} ${EVIL_LIBS}"
459 lt_enable_auto_import="-Wl,--enable-auto-import" 455 lt_enable_auto_import="-Wl,--enable-auto-import"
460 ;; 456 ;;
461esac 457esac
462case "$host_vendor" in
463 ps3*)
464 # Escape had already been checked to exist
465 EINA_LIBS="${ESCAPE_LIBS}"
466 ;;
467esac
468AC_SUBST([EINA_LIBS])
469AC_SUBST([lt_enable_auto_import]) 458AC_SUBST([lt_enable_auto_import])
470 459
471EFL_LINKER_FLAG([-fno-strict-aliasing]) 460EFL_LINKER_FLAG([-fno-strict-aliasing])