diff options
-rw-r--r-- | configure.ac | 25 | ||||
-rw-r--r-- | m4/ac_define_if.m4 | 7 |
2 files changed, 15 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index ca6201ceef..8642846e67 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -330,9 +330,9 @@ if test -n "$with_max_log_level"; then | |||
330 | AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.]) | 330 | AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.]) |
331 | fi | 331 | fi |
332 | 332 | ||
333 | if test "x${have_stringshare_usage}" = "xyes"; then | 333 | AC_DEFINE_IF([EINA_STRINGSHARE_USAGE], |
334 | AC_DEFINE([EINA_STRINGSHARE_USAGE], [1], [Report Eina stringshare usage pattern]) | 334 | [test "x${have_stringshare_usage}" = "xyes"], |
335 | fi | 335 | [1], [Report Eina stringshare usage pattern]) |
336 | 336 | ||
337 | ### Checks for programs | 337 | ### Checks for programs |
338 | 338 | ||
@@ -383,9 +383,9 @@ else | |||
383 | AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled]) | 383 | AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled]) |
384 | fi | 384 | fi |
385 | 385 | ||
386 | if test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_malloc}" = "xyes"; then | 386 | AC_DEFINE_IF([EINA_DEBUG_MALLOC], |
387 | AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool]) | 387 | [test "x${ac_cv_func_malloc_usable_size}" = "xyes" -a "x${want_debug_malloc}" = "xyes"], |
388 | fi | 388 | [1], [Turn on debugging overhead in mempool]) |
389 | 389 | ||
390 | ## Modules | 390 | ## Modules |
391 | if ! test "x${requirements_pc_deps_eina}" = "x" ; then | 391 | if ! test "x${requirements_pc_deps_eina}" = "x" ; then |
@@ -434,14 +434,6 @@ CFLAGS="${CFLAGS_save}" | |||
434 | EINA_CONFIG(HAVE_INTTYPES_H, test "x${ac_cv_header_inttypes_h}" = "xyes") | 434 | EINA_CONFIG(HAVE_INTTYPES_H, test "x${ac_cv_header_inttypes_h}" = "xyes") |
435 | EINA_CONFIG(HAVE_STDINT_H, test "x${ac_cv_header_inttypes_h}" = "xyes") | 435 | EINA_CONFIG(HAVE_STDINT_H, test "x${ac_cv_header_inttypes_h}" = "xyes") |
436 | 436 | ||
437 | if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then | ||
438 | AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.]) | ||
439 | fi | ||
440 | |||
441 | if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then | ||
442 | AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.]) | ||
443 | fi | ||
444 | |||
445 | ### Checks for types | 437 | ### Checks for types |
446 | 438 | ||
447 | # wchar_t | 439 | # wchar_t |
@@ -465,9 +457,8 @@ AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"], | |||
465 | ]]) | 457 | ]]) |
466 | 458 | ||
467 | EINA_CONFIG(HAVE_DIRENT_H, test "x${have_dirent}" = "xyes") | 459 | EINA_CONFIG(HAVE_DIRENT_H, test "x${have_dirent}" = "xyes") |
468 | if test "x${have_dirent}" = "xyes" ; then | 460 | AC_DEFINE_IF([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"], |
469 | AC_DEFINE([HAVE_DIRENT_H], [1], [Define to 1 if you have a valid <dirent.h> header file.]) | 461 | [1], [Define to 1 if you have a valid <dirent.h> header file.]) |
470 | fi | ||
471 | 462 | ||
472 | ### Checks for structures | 463 | ### Checks for structures |
473 | 464 | ||
diff --git a/m4/ac_define_if.m4 b/m4/ac_define_if.m4 new file mode 100644 index 0000000000..961ca64452 --- /dev/null +++ b/m4/ac_define_if.m4 | |||
@@ -0,0 +1,7 @@ | |||
1 | dnl use: AC_DEFINE_IF(id, testcond, val, comment) | ||
2 | AC_DEFUN([AC_DEFINE_IF], | ||
3 | [ | ||
4 | if $2; then | ||
5 | AC_DEFINE($1, $3, $4) | ||
6 | fi | ||
7 | ]) | ||