From 390f94bcfd780ec3f4a805dc194213efede5f3e1 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sat, 27 Jun 2009 06:42:14 +0000 Subject: [PATCH] update m4 macros (mainly formatting) SVN revision: 41212 --- legacy/ecore/m4/ac_attribute.m4 | 5 +- legacy/ecore/m4/efl_doxygen.m4 | 8 +- legacy/edje/m4/ac_attribute.m4 | 5 +- legacy/edje/m4/efl_doxygen.m4 | 8 +- legacy/eet/m4/ac_attribute.m4 | 5 +- legacy/eet/m4/efl_coverage.m4 | 12 +- legacy/eet/m4/efl_doxygen.m4 | 8 +- legacy/eet/m4/efl_tests.m4 | 15 +- legacy/efreet/m4/ac_attribute.m4 | 5 +- legacy/efreet/m4/efl_doxygen.m4 | 8 +- legacy/eina/m4/ac_attribute.m4 | 5 +- legacy/eina/m4/efl_benchmark.m4 | 12 +- legacy/eina/m4/efl_coverage.m4 | 12 +- legacy/eina/m4/efl_cpu.m4 | 296 +++++++++++++++++++------------ legacy/eina/m4/efl_doxygen.m4 | 8 +- legacy/eina/m4/efl_tests.m4 | 17 +- legacy/embryo/m4/ac_attribute.m4 | 5 +- legacy/embryo/m4/efl_doxygen.m4 | 8 +- legacy/evas/m4/ac_attribute.m4 | 8 +- legacy/evas/m4/efl_doxygen.m4 | 8 +- 20 files changed, 267 insertions(+), 191 deletions(-) diff --git a/legacy/ecore/m4/ac_attribute.m4 b/legacy/ecore/m4/ac_attribute.m4 index 3926d23d56..23479a92ac 100644 --- a/legacy/ecore/m4/ac_attribute.m4 +++ b/legacy/ecore/m4/ac_attribute.m4 @@ -31,8 +31,7 @@ int foo(int x __attribute__ ((unused))) [], [ac_cv___attribute__="yes"], [ac_cv___attribute__="no"] - )] -) + )]) AC_MSG_RESULT($ac_cv___attribute__) @@ -44,3 +43,5 @@ if test "x${ac_cv___attribute__}" = "xyes" ; then fi ]) + +dnl End of ac_attribute.m4 diff --git a/legacy/ecore/m4/efl_doxygen.m4 b/legacy/ecore/m4/efl_doxygen.m4 index dd6bc3e895..d83ed68b8a 100644 --- a/legacy/ecore/m4/efl_doxygen.m4 +++ b/legacy/ecore/m4/efl_doxygen.m4 @@ -32,9 +32,7 @@ AC_MSG_RESULT([${efl_enable_doc}]) if test "x${efl_enable_doc}" = "xyes" ; then -dnl dnl Specify the file name, without path -dnl efl_doxygen="doxygen" @@ -42,9 +40,9 @@ dnl [AC_HELP_STRING( [--with-doxygen=FILE], [doxygen program to use @<:@default=doxygen@:>@])], -dnl + dnl Check the given doxygen program. -dnl + [efl_doxygen=${withval} AC_CHECK_PROG([efl_have_doxygen], [${efl_doxygen}], @@ -96,4 +94,4 @@ fi ]) -dnl End of doxygen.m4 +dnl End of efl_doxygen.m4 diff --git a/legacy/edje/m4/ac_attribute.m4 b/legacy/edje/m4/ac_attribute.m4 index 3926d23d56..23479a92ac 100644 --- a/legacy/edje/m4/ac_attribute.m4 +++ b/legacy/edje/m4/ac_attribute.m4 @@ -31,8 +31,7 @@ int foo(int x __attribute__ ((unused))) [], [ac_cv___attribute__="yes"], [ac_cv___attribute__="no"] - )] -) + )]) AC_MSG_RESULT($ac_cv___attribute__) @@ -44,3 +43,5 @@ if test "x${ac_cv___attribute__}" = "xyes" ; then fi ]) + +dnl End of ac_attribute.m4 diff --git a/legacy/edje/m4/efl_doxygen.m4 b/legacy/edje/m4/efl_doxygen.m4 index dd6bc3e895..d83ed68b8a 100644 --- a/legacy/edje/m4/efl_doxygen.m4 +++ b/legacy/edje/m4/efl_doxygen.m4 @@ -32,9 +32,7 @@ AC_MSG_RESULT([${efl_enable_doc}]) if test "x${efl_enable_doc}" = "xyes" ; then -dnl dnl Specify the file name, without path -dnl efl_doxygen="doxygen" @@ -42,9 +40,9 @@ dnl [AC_HELP_STRING( [--with-doxygen=FILE], [doxygen program to use @<:@default=doxygen@:>@])], -dnl + dnl Check the given doxygen program. -dnl + [efl_doxygen=${withval} AC_CHECK_PROG([efl_have_doxygen], [${efl_doxygen}], @@ -96,4 +94,4 @@ fi ]) -dnl End of doxygen.m4 +dnl End of efl_doxygen.m4 diff --git a/legacy/eet/m4/ac_attribute.m4 b/legacy/eet/m4/ac_attribute.m4 index 3926d23d56..23479a92ac 100644 --- a/legacy/eet/m4/ac_attribute.m4 +++ b/legacy/eet/m4/ac_attribute.m4 @@ -31,8 +31,7 @@ int foo(int x __attribute__ ((unused))) [], [ac_cv___attribute__="yes"], [ac_cv___attribute__="no"] - )] -) + )]) AC_MSG_RESULT($ac_cv___attribute__) @@ -44,3 +43,5 @@ if test "x${ac_cv___attribute__}" = "xyes" ; then fi ]) + +dnl End of ac_attribute.m4 diff --git a/legacy/eet/m4/efl_coverage.m4 b/legacy/eet/m4/efl_coverage.m4 index 1618f76fee..baf00021ec 100644 --- a/legacy/eet/m4/efl_coverage.m4 +++ b/legacy/eet/m4/efl_coverage.m4 @@ -16,7 +16,7 @@ AC_DEFUN([EFL_CHECK_COVERAGE], dnl configure option AC_ARG_ENABLE([coverage], - [AC_HELP_STRING([--enable-coverage], [compile with coverage profiling instrumentation @<:@default=no@:>@])], + [AC_HELP_STRING([--enable-coverage], [enable coverage profiling instrumentation @<:@default=disabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_coverage="yes" @@ -24,8 +24,8 @@ AC_ARG_ENABLE([coverage], _efl_enable_coverage="no" fi ], - [_efl_enable_coverage="no"] -) + [_efl_enable_coverage="no"]) + AC_MSG_CHECKING([whether to use profiling instrumentation]) AC_MSG_RESULT([$_efl_enable_coverage]) @@ -57,8 +57,10 @@ AC_SUBST(EFL_COVERAGE_LIBS) AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes") if test "x${_efl_enable_coverage}" = "xyes" ; then - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) else - ifelse([$3], , :, [$3]) + m4_default([$3], [:]) fi ]) + +dnl End of efl_coverage.m4 diff --git a/legacy/eet/m4/efl_doxygen.m4 b/legacy/eet/m4/efl_doxygen.m4 index dd6bc3e895..d83ed68b8a 100644 --- a/legacy/eet/m4/efl_doxygen.m4 +++ b/legacy/eet/m4/efl_doxygen.m4 @@ -32,9 +32,7 @@ AC_MSG_RESULT([${efl_enable_doc}]) if test "x${efl_enable_doc}" = "xyes" ; then -dnl dnl Specify the file name, without path -dnl efl_doxygen="doxygen" @@ -42,9 +40,9 @@ dnl [AC_HELP_STRING( [--with-doxygen=FILE], [doxygen program to use @<:@default=doxygen@:>@])], -dnl + dnl Check the given doxygen program. -dnl + [efl_doxygen=${withval} AC_CHECK_PROG([efl_have_doxygen], [${efl_doxygen}], @@ -96,4 +94,4 @@ fi ]) -dnl End of doxygen.m4 +dnl End of efl_doxygen.m4 diff --git a/legacy/eet/m4/efl_tests.m4 b/legacy/eet/m4/efl_tests.m4 index 8d193b601c..98d11bb7e8 100644 --- a/legacy/eet/m4/efl_tests.m4 +++ b/legacy/eet/m4/efl_tests.m4 @@ -13,7 +13,7 @@ AC_DEFUN([EFL_CHECK_TESTS], dnl configure option AC_ARG_ENABLE([tests], - [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=no@:>@])], + [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=disabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_tests="yes" @@ -21,8 +21,8 @@ AC_ARG_ENABLE([tests], _efl_enable_tests="no" fi ], - [_efl_enable_tests="no"] -) + [_efl_enable_tests="no"]) + AC_MSG_CHECKING([whether tests are built]) AC_MSG_RESULT([${_efl_enable_tests}]) @@ -32,15 +32,16 @@ if test "x${_efl_enable_tests}" = "xyes" ; then PKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [dummy="yes"], - [_efl_enable_tests="no"] - ) + [_efl_enable_tests="no"]) fi AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes") if test "x${_efl_enable_tests}" = "xyes" ; then - ifelse([$1], , :, [$1]) + m4_default([$1], [:]) else - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) fi ]) + +dnl End of efl_tests.m4 diff --git a/legacy/efreet/m4/ac_attribute.m4 b/legacy/efreet/m4/ac_attribute.m4 index 3926d23d56..23479a92ac 100644 --- a/legacy/efreet/m4/ac_attribute.m4 +++ b/legacy/efreet/m4/ac_attribute.m4 @@ -31,8 +31,7 @@ int foo(int x __attribute__ ((unused))) [], [ac_cv___attribute__="yes"], [ac_cv___attribute__="no"] - )] -) + )]) AC_MSG_RESULT($ac_cv___attribute__) @@ -44,3 +43,5 @@ if test "x${ac_cv___attribute__}" = "xyes" ; then fi ]) + +dnl End of ac_attribute.m4 diff --git a/legacy/efreet/m4/efl_doxygen.m4 b/legacy/efreet/m4/efl_doxygen.m4 index dd6bc3e895..d83ed68b8a 100644 --- a/legacy/efreet/m4/efl_doxygen.m4 +++ b/legacy/efreet/m4/efl_doxygen.m4 @@ -32,9 +32,7 @@ AC_MSG_RESULT([${efl_enable_doc}]) if test "x${efl_enable_doc}" = "xyes" ; then -dnl dnl Specify the file name, without path -dnl efl_doxygen="doxygen" @@ -42,9 +40,9 @@ dnl [AC_HELP_STRING( [--with-doxygen=FILE], [doxygen program to use @<:@default=doxygen@:>@])], -dnl + dnl Check the given doxygen program. -dnl + [efl_doxygen=${withval} AC_CHECK_PROG([efl_have_doxygen], [${efl_doxygen}], @@ -96,4 +94,4 @@ fi ]) -dnl End of doxygen.m4 +dnl End of efl_doxygen.m4 diff --git a/legacy/eina/m4/ac_attribute.m4 b/legacy/eina/m4/ac_attribute.m4 index 3926d23d56..23479a92ac 100644 --- a/legacy/eina/m4/ac_attribute.m4 +++ b/legacy/eina/m4/ac_attribute.m4 @@ -31,8 +31,7 @@ int foo(int x __attribute__ ((unused))) [], [ac_cv___attribute__="yes"], [ac_cv___attribute__="no"] - )] -) + )]) AC_MSG_RESULT($ac_cv___attribute__) @@ -44,3 +43,5 @@ if test "x${ac_cv___attribute__}" = "xyes" ; then fi ]) + +dnl End of ac_attribute.m4 diff --git a/legacy/eina/m4/efl_benchmark.m4 b/legacy/eina/m4/efl_benchmark.m4 index 9e968c44d8..a1691ebcd4 100644 --- a/legacy/eina/m4/efl_benchmark.m4 +++ b/legacy/eina/m4/efl_benchmark.m4 @@ -12,7 +12,7 @@ AC_DEFUN([EFL_CHECK_BENCHMARK], dnl configure option AC_ARG_ENABLE([benchmark], - [AC_HELP_STRING([--enable-benchmark], [enable tests @<:@default=no@:>@])], + [AC_HELP_STRING([--enable-benchmark], [enable benchmarking @<:@default=disabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_benchmark="yes" @@ -20,16 +20,18 @@ AC_ARG_ENABLE([benchmark], _efl_enable_benchmark="no" fi ], - [_efl_enable_benchmark="no"] -) + [_efl_enable_benchmark="no"]) + AC_MSG_CHECKING([whether benchmark are built]) AC_MSG_RESULT([${_efl_enable_benchmark}]) AM_CONDITIONAL(EFL_ENABLE_BENCHMARK, test "x${_efl_enable_benchmark}" = "xyes") if test "x${_efl_enable_benchmark}" = "xyes" ; then - ifelse([$1], , :, [$1]) + m4_default([$1], [:]) else - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) fi ]) + +dnl End of efl_benchmark.m4 diff --git a/legacy/eina/m4/efl_coverage.m4 b/legacy/eina/m4/efl_coverage.m4 index 1618f76fee..baf00021ec 100644 --- a/legacy/eina/m4/efl_coverage.m4 +++ b/legacy/eina/m4/efl_coverage.m4 @@ -16,7 +16,7 @@ AC_DEFUN([EFL_CHECK_COVERAGE], dnl configure option AC_ARG_ENABLE([coverage], - [AC_HELP_STRING([--enable-coverage], [compile with coverage profiling instrumentation @<:@default=no@:>@])], + [AC_HELP_STRING([--enable-coverage], [enable coverage profiling instrumentation @<:@default=disabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_coverage="yes" @@ -24,8 +24,8 @@ AC_ARG_ENABLE([coverage], _efl_enable_coverage="no" fi ], - [_efl_enable_coverage="no"] -) + [_efl_enable_coverage="no"]) + AC_MSG_CHECKING([whether to use profiling instrumentation]) AC_MSG_RESULT([$_efl_enable_coverage]) @@ -57,8 +57,10 @@ AC_SUBST(EFL_COVERAGE_LIBS) AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes") if test "x${_efl_enable_coverage}" = "xyes" ; then - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) else - ifelse([$3], , :, [$3]) + m4_default([$3], [:]) fi ]) + +dnl End of efl_coverage.m4 diff --git a/legacy/eina/m4/efl_cpu.m4 b/legacy/eina/m4/efl_cpu.m4 index 28ee5a510e..ab047c03a4 100644 --- a/legacy/eina/m4/efl_cpu.m4 +++ b/legacy/eina/m4/efl_cpu.m4 @@ -9,11 +9,10 @@ dnl Define EFL_HAVE_MMX AC_DEFUN([EFL_CHECK_CPU_MMX], [ - dnl configure option AC_ARG_ENABLE([cpu-mmx], - [AC_HELP_STRING([--enable-cpu-mmx], [enable mmx code @<:@default=yes@:>@])], + [AC_HELP_STRING([--disable-cpu-mmx], [disable mmx code @<:@default=enabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_cpu_mmx="yes" @@ -21,8 +20,8 @@ AC_ARG_ENABLE([cpu-mmx], _efl_enable_cpu_mmx="no" fi ], - [_efl_enable_cpu_mmx="yes"] -) + [_efl_enable_cpu_mmx="yes"]) + AC_MSG_CHECKING([whether to build mmx code]) AC_MSG_RESULT([${_efl_enable_cpu_mmx}]) @@ -30,42 +29,49 @@ dnl check if the CPU is supporting MMX instruction sets _efl_build_cpu_mmx="no" if test "x${_efl_enable_cpu_mmx}" = "xyes" ; then -case $host_cpu in - i*86) - _efl_build_cpu_mmx="yes" - ;; - x86_64) - _efl_build_cpu_mmx="yes" - ;; -esac + case $host_cpu in + i*86 | x86_64) + _efl_build_cpu_mmx="yes" + ;; + esac fi +AC_MSG_CHECKING([whether mmx instructions set is available]) +AC_MSG_RESULT([${_efl_build_cpu_mmx}]) + dnl check if the compiler supports -mmmx -SAVE_CFLAGS=${CFLAGS} -CFLAGS="-mmmx" -AC_LANG_PUSH([C]) +if test "x${_efl_build_cpu_mmx}" = "xyes" ; then + SAVE_CFLAGS=${CFLAGS} + CFLAGS="-mmmx" + AC_LANG_PUSH([C]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], - [[]]) - ], - [EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -mmmx"] -) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], + [[]]) + ], + [ + have_linker_option="yes" + EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -mmmx"], + [have_linker_option="no"]) -AC_LANG_POP([C]) -CFLAGS=${SAVE_CFLAGS} + AC_LANG_POP([C]) + CFLAGS=${SAVE_CFLAGS} + + AC_MSG_CHECKING([whether mmx linker option is supported]) + AC_MSG_RESULT([${have_linker_option}]) +fi AC_SUBST(EFL_SIMD_FLAGS) if test "x${_efl_build_cpu_mmx}" = "xyes" ; then - AC_DEFINE(EFL_HAVE_MMX, 1, [Define to mention that MMX is supported]) + AC_DEFINE([EFL_HAVE_MMX], [1], [Define to mention that MMX is supported]) fi if test "x${_efl_build_cpu_mmx}" = "xyes" ; then - ifelse([$1], , :, [$1]) + m4_default([$1], [:]) else - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) fi ]) @@ -75,11 +81,10 @@ dnl Define EFL_HAVE_SSE AC_DEFUN([EFL_CHECK_CPU_SSE], [ - dnl configure option AC_ARG_ENABLE([cpu-sse], - [AC_HELP_STRING([--enable-cpu-sse], [enable sse code @<:@default=yes@:>@])], + [AC_HELP_STRING([--disable-cpu-sse], [disable sse code @<:@default=enabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_cpu_sse="yes" @@ -87,8 +92,8 @@ AC_ARG_ENABLE([cpu-sse], _efl_enable_cpu_sse="no" fi ], - [_efl_enable_cpu_sse="yes"] -) + [_efl_enable_cpu_sse="yes"]) + AC_MSG_CHECKING([whether to build sse code]) AC_MSG_RESULT([${_efl_enable_cpu_sse}]) @@ -96,42 +101,50 @@ dnl check if the CPU is supporting SSE instruction sets _efl_build_cpu_sse="no" if test "x${_efl_enable_cpu_sse}" = "xyes" ; then -case $host_cpu in - i*86) - _efl_build_cpu_sse="yes" - ;; - x86_64) - _efl_build_cpu_sse="yes" - ;; -esac + case $host_cpu in + i*86 | x86_64) + _efl_build_cpu_sse="yes" + ;; + esac fi +AC_MSG_CHECKING([whether sse instructions set is available]) +AC_MSG_RESULT([${_efl_build_cpu_sse}]) + dnl check if the compiler supports -msse -SAVE_CFLAGS=${CFLAGS} -CFLAGS="-msse" -AC_LANG_PUSH([C]) +if test "x${_efl_build_cpu_sse}" = "xyes" ; then + SAVE_CFLAGS=${CFLAGS} + CFLAGS="-msse" + AC_LANG_PUSH([C]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], - [[]]) - ], - [EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -msse"] -) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], + [[]]) + ], + [ + have_linker_option="yes" + EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -msse" + ], + [have_linker_option="no"]) -AC_LANG_POP([C]) -CFLAGS=${SAVE_CFLAGS} + AC_LANG_POP([C]) + CFLAGS=${SAVE_CFLAGS} + + AC_MSG_CHECKING([whether sse linker option is supported]) + AC_MSG_RESULT([${have_linker_option}]) +fi AC_SUBST(EFL_SIMD_FLAGS) if test "x${_efl_build_cpu_sse}" = "xyes" ; then - AC_DEFINE(EFL_HAVE_SSE, 1, [Define to mention that SSE is supported]) + AC_DEFINE([EFL_HAVE_SSE], [1], [Define to mention that SSE is supported]) fi if test "x${_efl_build_cpu_sse}" = "xyes" ; then - ifelse([$1], , :, [$1]) + m4_default([$1], [:]) else - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) fi ]) @@ -145,7 +158,7 @@ AC_DEFUN([EFL_CHECK_CPU_SSE2], dnl configure option AC_ARG_ENABLE([cpu-sse2], - [AC_HELP_STRING([--enable-cpu-sse2], [enable sse2 code @<:@default=yes@:>@])], + [AC_HELP_STRING([--disable-cpu-sse2], [disable sse2 code @<:@default=enabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_cpu_sse2="yes" @@ -153,8 +166,8 @@ AC_ARG_ENABLE([cpu-sse2], _efl_enable_cpu_sse2="no" fi ], - [_efl_enable_cpu_sse2="yes"] -) + [_efl_enable_cpu_sse2="yes"]) + AC_MSG_CHECKING([whether to build sse2 code]) AC_MSG_RESULT([${_efl_enable_cpu_sse2}]) @@ -162,42 +175,50 @@ dnl check if the CPU is supporting SSE2 instruction sets _efl_build_cpu_sse2="no" if test "x${_efl_enable_cpu_sse2}" = "xyes" ; then -case $host_cpu in - i686) - _efl_build_cpu_sse2="yes" - ;; - x86_64) - _efl_build_cpu_sse2="yes" - ;; -esac + case $host_cpu in + i686 | x86_64) + _efl_build_cpu_sse2="yes" + ;; + esac fi +AC_MSG_CHECKING([whether sse2 instructions set is available]) +AC_MSG_RESULT([${_efl_build_cpu_sse2}]) + dnl check if the compiler supports -msse2 -SAVE_CFLAGS=${CFLAGS} -CFLAGS="-msse2" -AC_LANG_PUSH([C]) +if test "x${_efl_build_cpu_sse2}" = "xyes" ; then + SAVE_CFLAGS=${CFLAGS} + CFLAGS="-msse2" + AC_LANG_PUSH([C]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], - [[]]) - ], - [EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -msse2"] -) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], + [[]]) + ], + [ + have_linker_option="yes" + EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -msse2" + ], + [have_linker_option="no"]) -AC_LANG_POP([C]) -CFLAGS=${SAVE_CFLAGS} + AC_LANG_POP([C]) + CFLAGS=${SAVE_CFLAGS} + + AC_MSG_CHECKING([whether sse2 linker option is supported]) + AC_MSG_RESULT([${have_linker_option}]) +fi AC_SUBST(EFL_SIMD_FLAGS) if test "x${_efl_build_cpu_sse2}" = "xyes" ; then - AC_DEFINE(EFL_HAVE_SSE2, 1, [Define to mention that SSE2 is supported]) + AC_DEFINE([EFL_HAVE_SSE2], [1], [Define to mention that SSE2 is supported]) fi if test "x${_efl_build_cpu_sse2}" = "xyes" ; then - ifelse([$1], , :, [$1]) + m4_default([$1], [:]) else - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) fi ]) @@ -212,7 +233,7 @@ AC_DEFUN([EFL_CHECK_CPU_ALTIVEC], dnl configure option AC_ARG_ENABLE([cpu-altivec], - [AC_HELP_STRING([--enable-cpu-altivec], [enable altivec code @<:@default=yes@:>@])], + [AC_HELP_STRING([--disable-cpu-altivec], [disable altivec code @<:@default=enabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_cpu_altivec="yes" @@ -229,32 +250,24 @@ dnl check if the CPU is supporting ALTIVEC instruction sets _efl_build_cpu_altivec="no" if test "x${_efl_enable_cpu_altivec}" = "xyes" ; then -case $host_cpu in - *power* | *ppc*) - _efl_build_cpu_altivec="yes" - ;; -esac + case $host_cpu in + *power* | *ppc*) + _efl_build_cpu_altivec="yes" + ;; + esac fi +AC_MSG_CHECKING([whether altivec instructions set is available]) +AC_MSG_RESULT([${_efl_build_cpu_altivec}]) + dnl check if the compiler supports -faltivec or -maltivec and dnl if altivec.h is available. -SAVE_CFLAGS=${CFLAGS} -CFLAGS="-faltivec" -AC_LANG_PUSH([C]) - -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -#include - ]], - [[]])], - [_efl_have_faltivec="yes" - _efl_altivec_flag="-faltivec"], - [_efl_have_faltivec="no"] -) - -if test "x${_efl_have_faltivec}" = "xno" ; then - CFLAGS="-maltivec" +_efl_have_faltivec="no" +if test "x${_efl_build_cpu_altivec}" = "xyes" ; then + SAVE_CFLAGS=${CFLAGS} + CFLAGS="-faltivec" + AC_LANG_PUSH([C]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ @@ -262,27 +275,88 @@ if test "x${_efl_have_faltivec}" = "xno" ; then ]], [[]])], [_efl_have_faltivec="yes" - _efl_altivec_flag="-maltivec"], - [_efl_have_faltivec="no"] - ) + _efl_altivec_flag="-faltivec"], + [_efl_have_faltivec="no"]) + + if test "x${_efl_have_faltivec}" = "xno" ; then + CFLAGS="-maltivec" + + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +#include + ]], + [[]])], + [_efl_have_faltivec="yes" + _efl_altivec_flag="-maltivec"], + [_efl_have_faltivec="no"]) + fi + + AC_LANG_POP([C]) + CFLAGS=${SAVE_CFLAGS} + + AC_MSG_CHECKING([whether altivec linker option is supported]) + AC_MSG_RESULT([${_efl_have_faltivec}]) fi -AC_MSG_CHECKING([whether altivec code is supported]) -AC_MSG_RESULT([${_efl_have_faltivec}]) - -AC_LANG_POP([C]) -CFLAGS=${SAVE_CFLAGS} - EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} ${_efl_altivec_flag}" AC_SUBST(EFL_SIMD_FLAGS) if test "x${_efl_have_faltivec}" = "xyes" ; then - AC_DEFINE(EFL_HAVE_ALTIVEC, 1, [Define to mention that ALTIVEC is supported]) + AC_DEFINE([EFL_HAVE_ALTIVEC], [1], [Define to mention that ALTIVEC is supported]) fi if test "x${_efl_have_faltivec}" = "xyes" ; then - ifelse([$1], , :, [$1]) + m4_default([$1], [:]) else - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) fi ]) + +dnl Usage: EFL_CHECK_CPU_NEON([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl Add -mneon to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS) +dnl Define EFL_HAVE_NEON + +AC_DEFUN([EFL_CHECK_CPU_NEON], +[ +dnl configure option + +AC_ARG_ENABLE([cpu-neon], + [AC_HELP_STRING([--disable-cpu-neon], [disable neon code @<:@default=enabled@:>@])], + [ + if test "x${enableval}" = "xyes" ; then + _efl_enable_cpu_neon="yes" + else + _efl_enable_cpu_neon="no" + fi + ], + [_efl_enable_cpu_neon="yes"]) + +AC_MSG_CHECKING([whether to build neon code]) +AC_MSG_RESULT([${_efl_enable_cpu_neon}]) + +dnl check if the CPU is supporting NEON instruction sets + +_efl_build_cpu_neon="no" +if test "x${_efl_enable_cpu_neon}" = "xyes" ; then + case $host_cpu in + armv7*) + _efl_build_cpu_neon="yes" + ;; + esac +fi + +AC_MSG_CHECKING([whether neon instructions set is available]) +AC_MSG_RESULT([${_efl_build_cpu_neon}]) + +if test "x${_efl_build_cpu_neon}" = "xyes" ; then + AC_DEFINE([EFL_HAVE_NEON], [1], [Define to mention that NEON is supported]) +fi + +if test "x${_efl_build_cpu_neon}" = "xyes" ; then + m4_default([$1], [:]) +else + m4_default([$2], [:]) +fi +]) + +dnl End of efl_cpu.m4 diff --git a/legacy/eina/m4/efl_doxygen.m4 b/legacy/eina/m4/efl_doxygen.m4 index dd6bc3e895..d83ed68b8a 100644 --- a/legacy/eina/m4/efl_doxygen.m4 +++ b/legacy/eina/m4/efl_doxygen.m4 @@ -32,9 +32,7 @@ AC_MSG_RESULT([${efl_enable_doc}]) if test "x${efl_enable_doc}" = "xyes" ; then -dnl dnl Specify the file name, without path -dnl efl_doxygen="doxygen" @@ -42,9 +40,9 @@ dnl [AC_HELP_STRING( [--with-doxygen=FILE], [doxygen program to use @<:@default=doxygen@:>@])], -dnl + dnl Check the given doxygen program. -dnl + [efl_doxygen=${withval} AC_CHECK_PROG([efl_have_doxygen], [${efl_doxygen}], @@ -96,4 +94,4 @@ fi ]) -dnl End of doxygen.m4 +dnl End of efl_doxygen.m4 diff --git a/legacy/eina/m4/efl_tests.m4 b/legacy/eina/m4/efl_tests.m4 index 3478b54a16..98d11bb7e8 100644 --- a/legacy/eina/m4/efl_tests.m4 +++ b/legacy/eina/m4/efl_tests.m4 @@ -13,7 +13,7 @@ AC_DEFUN([EFL_CHECK_TESTS], dnl configure option AC_ARG_ENABLE([tests], - [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=no@:>@])], + [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=disabled@:>@])], [ if test "x${enableval}" = "xyes" ; then _efl_enable_tests="yes" @@ -21,24 +21,27 @@ AC_ARG_ENABLE([tests], _efl_enable_tests="no" fi ], - [_efl_enable_tests="no"] -) + [_efl_enable_tests="no"]) + AC_MSG_CHECKING([whether tests are built]) AC_MSG_RESULT([${_efl_enable_tests}]) +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + if test "x${_efl_enable_tests}" = "xyes" ; then PKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [dummy="yes"], - [_efl_enable_tests="no"] - ) + [_efl_enable_tests="no"]) fi AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes") if test "x${_efl_enable_tests}" = "xyes" ; then - ifelse([$1], , :, [$1]) + m4_default([$1], [:]) else - ifelse([$2], , :, [$2]) + m4_default([$2], [:]) fi ]) + +dnl End of efl_tests.m4 diff --git a/legacy/embryo/m4/ac_attribute.m4 b/legacy/embryo/m4/ac_attribute.m4 index 3926d23d56..23479a92ac 100644 --- a/legacy/embryo/m4/ac_attribute.m4 +++ b/legacy/embryo/m4/ac_attribute.m4 @@ -31,8 +31,7 @@ int foo(int x __attribute__ ((unused))) [], [ac_cv___attribute__="yes"], [ac_cv___attribute__="no"] - )] -) + )]) AC_MSG_RESULT($ac_cv___attribute__) @@ -44,3 +43,5 @@ if test "x${ac_cv___attribute__}" = "xyes" ; then fi ]) + +dnl End of ac_attribute.m4 diff --git a/legacy/embryo/m4/efl_doxygen.m4 b/legacy/embryo/m4/efl_doxygen.m4 index dd6bc3e895..d83ed68b8a 100644 --- a/legacy/embryo/m4/efl_doxygen.m4 +++ b/legacy/embryo/m4/efl_doxygen.m4 @@ -32,9 +32,7 @@ AC_MSG_RESULT([${efl_enable_doc}]) if test "x${efl_enable_doc}" = "xyes" ; then -dnl dnl Specify the file name, without path -dnl efl_doxygen="doxygen" @@ -42,9 +40,9 @@ dnl [AC_HELP_STRING( [--with-doxygen=FILE], [doxygen program to use @<:@default=doxygen@:>@])], -dnl + dnl Check the given doxygen program. -dnl + [efl_doxygen=${withval} AC_CHECK_PROG([efl_have_doxygen], [${efl_doxygen}], @@ -96,4 +94,4 @@ fi ]) -dnl End of doxygen.m4 +dnl End of efl_doxygen.m4 diff --git a/legacy/evas/m4/ac_attribute.m4 b/legacy/evas/m4/ac_attribute.m4 index 04bf5f2a49..23479a92ac 100644 --- a/legacy/evas/m4/ac_attribute.m4 +++ b/legacy/evas/m4/ac_attribute.m4 @@ -31,17 +31,17 @@ int foo(int x __attribute__ ((unused))) [], [ac_cv___attribute__="yes"], [ac_cv___attribute__="no"] - )] -) + )]) AC_MSG_RESULT($ac_cv___attribute__) if test "x${ac_cv___attribute__}" = "xyes" ; then AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__]) AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused]) - AC_DEFINE([__PACKED__], [__attribute__((packed))], [Macro declaring a function argument to be unused]) else - AC_DEFINE([__PACKED__], [], [Macro declaring a function argument to be unused]) + AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused]) fi ]) + +dnl End of ac_attribute.m4 diff --git a/legacy/evas/m4/efl_doxygen.m4 b/legacy/evas/m4/efl_doxygen.m4 index dd6bc3e895..d83ed68b8a 100644 --- a/legacy/evas/m4/efl_doxygen.m4 +++ b/legacy/evas/m4/efl_doxygen.m4 @@ -32,9 +32,7 @@ AC_MSG_RESULT([${efl_enable_doc}]) if test "x${efl_enable_doc}" = "xyes" ; then -dnl dnl Specify the file name, without path -dnl efl_doxygen="doxygen" @@ -42,9 +40,9 @@ dnl [AC_HELP_STRING( [--with-doxygen=FILE], [doxygen program to use @<:@default=doxygen@:>@])], -dnl + dnl Check the given doxygen program. -dnl + [efl_doxygen=${withval} AC_CHECK_PROG([efl_have_doxygen], [${efl_doxygen}], @@ -96,4 +94,4 @@ fi ]) -dnl End of doxygen.m4 +dnl End of efl_doxygen.m4