From: Enlightenment S. <no-...@en...> - 2012-10-10 22:00:12
|
Log: efl: m4 macro to ease config file creation. Author: barbieri Date: 2012-10-10 15:00:06 -0700 (Wed, 10 Oct 2012) New Revision: 77832 Trac: http://trac.enlightenment.org/e/changeset/77832 Added: trunk/efl/m4/eina_config.m4 Modified: trunk/efl/configure.ac Modified: trunk/efl/configure.ac =================================================================== --- trunk/efl/configure.ac 2012-10-10 21:51:59 UTC (rev 77831) +++ trunk/efl/configure.ac 2012-10-10 22:00:06 UTC (rev 77832) @@ -322,16 +322,9 @@ ;; esac -if test "x${have_magic_debug}" = "xyes" ; then - EINA_CONFIGURE_MAGIC_DEBUG="#define EINA_MAGIC_DEBUG" -fi -AC_SUBST([EINA_CONFIGURE_MAGIC_DEBUG]) +EINA_CONFIG(MAGIC_DEBUG, test "x${have_magic_debug}" = "xyes") +EINA_CONFIG(SAFETY_CHECKS, test "x${have_safety_checks}" = "xyes") -if test "x${have_safety_checks}" = "xyes" ; then - EINA_CONFIGURE_SAFETY_CHECKS="#define EINA_SAFETY_CHECKS" -fi -AC_SUBST([EINA_CONFIGURE_SAFETY_CHECKS]) - if test -n "$with_max_log_level"; then AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${with_max_log_level}]) AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.]) @@ -438,17 +431,16 @@ AC_CHECK_HEADERS([sys/mman.h]) CFLAGS="${CFLAGS_save}" +EINA_CONFIG(HAVE_INTTYPES_H, test "x${ac_cv_header_inttypes_h}" = "xyes") +EINA_CONFIG(HAVE_STDINT_H, test "x${ac_cv_header_inttypes_h}" = "xyes") + if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then - EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H" AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.]) fi -AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H]) if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then - EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H" AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.]) fi -AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H]) ### Checks for types @@ -472,11 +464,10 @@ #include <dirent.h> ]]) +EINA_CONFIG(HAVE_DIRENT_H, test "x${have_dirent}" = "xyes") if test "x${have_dirent}" = "xyes" ; then - EINA_CONFIGURE_HAVE_DIRENT_H="#define EINA_HAVE_DIRENT_H" AC_DEFINE([HAVE_DIRENT_H], [1], [Define to 1 if you have a valid <dirent.h> header file.]) fi -AC_SUBST([EINA_CONFIGURE_HAVE_DIRENT_H]) ### Checks for structures @@ -507,17 +498,11 @@ AC_MSG_CHECKING([wether to build Eina_Log infrastructure]) AC_MSG_RESULT([${enable_log}]) -if test "x${enable_log}" = "xyes"; then - EINA_CONFIGURE_ENABLE_LOG="#define EINA_ENABLE_LOG" -fi -AC_SUBST([EINA_CONFIGURE_ENABLE_LOG]) +EINA_CONFIG(ENABLE_LOG, test "x${enable_log}" = "xyes") EFL_CHECK_THREADS -if test "$want_debug_threads" = "yes"; then - EINA_CONFIGURE_HAVE_DEBUG_THREADS="#define EINA_HAVE_DEBUG_THREADS" -fi -AC_SUBST(EINA_CONFIGURE_HAVE_DEBUG_THREADS) +EINA_CONFIG(HAVE_DEBUG_THREADS, test "$want_debug_threads" = "yes") ### Modules EINA_CHECK_MODULE([chained-pool], [static], [chained pool]) |