From: Enlightenment S. <no-...@en...> - 2012-10-10 20:46:36
|
Log: efl: remove configure option to change mempool modules. Author: barbieri Date: 2012-10-10 13:46:29 -0700 (Wed, 10 Oct 2012) New Revision: 77808 Trac: http://trac.enlightenment.org/e/changeset/77808 Modified: trunk/efl/m4/eina_check.m4 Modified: trunk/efl/m4/eina_check.m4 =================================================================== --- trunk/efl/m4/eina_check.m4 2012-10-10 20:42:04 UTC (rev 77807) +++ trunk/efl/m4/eina_check.m4 2012-10-10 20:46:29 UTC (rev 77808) @@ -4,23 +4,22 @@ m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl -default_value=$2 +# AC_ARG_ENABLE([mempool-$1], +# [AC_HELP_STRING([--enable-mempool-$1], [enable build of $3 @<:@default=$2@:>@])], +# [ +# if test "x${enableval}" = "xyes" ; then +# enable_module="yes" +# else +# if test "x${enableval}" = "xstatic" ; then +# enable_module="static" +# else +# enable_module="no" +# fi +# fi +# ], +# [enable_module=$2]) +enable_module=$2 -AC_ARG_ENABLE([mempool-$1], - [AC_HELP_STRING([--enable-mempool-$1], [enable build of $3 @<:@default=$@:>@])], - [ - if test "x${enableval}" = "xyes" ; then - enable_module="yes" - else - if test "x${enableval}" = "xstatic" ; then - enable_module="static" - else - enable_module="no" - fi - fi - ], - [enable_module=$2]) - have_module="no" if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then have_module="yes" |
From: Enlightenment S. <no-...@en...> - 2012-12-06 22:22:46
|
Log: oops, missing file. Author: barbieri Date: 2012-12-06 14:22:38 -0800 (Thu, 06 Dec 2012) New Revision: 80401 Trac: http://trac.enlightenment.org/e/changeset/80401 Added: trunk/efl/m4/efl_pkg_config.m4 |
From: Enlightenment S. <no-...@en...> - 2012-12-07 20:08:41
|
Log: efl: always be strict on dependency checking. Author: barbieri Date: 2012-12-07 12:08:28 -0800 (Fri, 07 Dec 2012) New Revision: 80498 Trac: http://trac.enlightenment.org/e/changeset/80498 Modified: trunk/efl/m4/evas_check_engine.m4 trunk/efl/m4/evas_check_loader.m4 Modified: trunk/efl/m4/evas_check_engine.m4 =================================================================== --- trunk/efl/m4/evas_check_engine.m4 2012-12-07 19:38:21 UTC (rev 80497) +++ trunk/efl/m4/evas_check_engine.m4 2012-12-07 20:08:28 UTC (rev 80498) @@ -691,8 +691,8 @@ m4_default([EVAS_CHECK_ENGINE_DEP_]m4_defn([UP]))(DOWN, $3, ${want_engine}, [have_engine="yes"], [have_engine="no"]) fi -if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - AC_MSG_ERROR([$4 dependencies not found (strict dependencies checking)]) +if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes"; then + AC_MSG_ERROR([$4 dependencies not found]) fi AC_MSG_CHECKING([whether $4 rendering backend will be built]) Modified: trunk/efl/m4/evas_check_loader.m4 =================================================================== --- trunk/efl/m4/evas_check_loader.m4 2012-12-07 19:38:21 UTC (rev 80497) +++ trunk/efl/m4/evas_check_loader.m4 2012-12-07 20:08:28 UTC (rev 80498) @@ -442,8 +442,8 @@ m4_default([EVAS_CHECK_LOADER_DEP_]m4_defn([UP]))(DOWN, ${want_loader}, [have_loader="yes"], [have_loader="no"]) fi -if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - AC_MSG_ERROR([$1 dependencies not found (strict dependencies checking)]) +if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes"; then + AC_MSG_ERROR([$1 dependencies not found]) fi AC_MSG_CHECKING([whether $1 image loader will be built]) |
From: Enlightenment S. <no-...@en...> - 2012-12-07 22:51:47
|
Log: efl/evas: fix m4 typos that prevented xcb from getting proper libs/cflags Author: barbieri Date: 2012-12-07 14:51:40 -0800 (Fri, 07 Dec 2012) New Revision: 80504 Trac: http://trac.enlightenment.org/e/changeset/80504 Modified: trunk/efl/m4/evas_check_engine.m4 Modified: trunk/efl/m4/evas_check_engine.m4 =================================================================== --- trunk/efl/m4/evas_check_engine.m4 2012-12-07 22:50:47 UTC (rev 80503) +++ trunk/efl/m4/evas_check_engine.m4 2012-12-07 22:51:40 UTC (rev 80504) @@ -189,8 +189,8 @@ requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" else PKG_CHECK_MODULES([XCB], [${requirement}]) - evas_image_loader_[]$1[]_cflags="${XCB_CFLAGS}" - evas_image_loader_[]$1[]_libs="${XCB_LIBS}" + evas_engine_[]$1[]_cflags="${XCB_CFLAGS}" + evas_engine_[]$1[]_libs="${XCB_LIBS}" fi fi @@ -274,8 +274,8 @@ requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" else PKG_CHECK_MODULES([XCB_GL], [${requirement}]) - evas_image_loader_[]$1[]_cflags="${XCB_CFLAGS}" - evas_image_loader_[]$1[]_libs="${XCB_LIBS}" + evas_engine_[]$1[]_cflags="${XCB_CFLAGS}" + evas_engine_[]$1[]_libs="${XCB_LIBS}" fi fi @@ -489,8 +489,8 @@ requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" else PKG_CHECK_MODULES([SDL], [${requirement}]) - evas_image_loader_[]$1[]_cflags="${SDL_CFLAGS}" - evas_image_loader_[]$1[]_libs="${SDL_LIBS}" + evas_engine_[]$1[]_cflags="${SDL_CFLAGS}" + evas_engine_[]$1[]_libs="${SDL_LIBS}" fi fi |
From: Enlightenment S. <no-...@en...> - 2012-12-30 21:11:03
|
Log: efl: refactor EFL_CHECK_LIB() and EFL_CHECK_FUNC() - introduce EFL_CHECK_LIB_CODE() that does the try-link - introduce EFL_FIND_LIB_FOR_CODE() that will use EFL_CHECK_LIB_CODE() into multiple libraries - also fix dladdr() test (was missing .h in #include <stdlib>) Author: barbieri Date: 2012-12-30 13:10:52 -0800 (Sun, 30 Dec 2012) New Revision: 81909 Trac: http://trac.enlightenment.org/e/changeset/81909 Modified: trunk/efl/m4/efl_check_funcs.m4 trunk/efl/m4/efl_check_libs.m4 Modified: trunk/efl/m4/efl_check_funcs.m4 =================================================================== --- trunk/efl/m4/efl_check_funcs.m4 2012-12-30 19:05:18 UTC (rev 81908) +++ trunk/efl/m4/efl_check_funcs.m4 2012-12-30 21:10:52 UTC (rev 81909) @@ -12,534 +12,224 @@ dnl setxattr (an al.) dnl shm_open +dnl EFL_CHECK_LIB_CODE(EFL, LIB, VARIABLE, HEADER, BODY) +dnl wrapper around AC_LINK_IFELSE(AC_LANG_PROGRAM()) to check +dnl if some code would work with the given lib. +dnl If the code work, EFL_ADD_LIBS(EFL, LIB) will be called +dnl At the end VARIABLE will be "yes" or "no" +AC_DEFUN([EFL_CHECK_LIB_CODE], +[ +LIBS_save="${LIBS}" +LIBS="${LIBS} $2" +AC_LINK_IFELSE([AC_LANG_PROGRAM([$4], [$5])], + [EFL_ADD_LIBS([$1], [$2]) + $3="yes"], [$3="no"]) +LIBS="${LIBS_save}" +]) +dnl EFL_FIND_LIB_FOR_CODE(EFL, LIBS, VARIABLE, HEADER, BODY) +AC_DEFUN([EFL_FIND_LIB_FOR_CODE], +[ +dnl first try without lib (libc) +EFL_CHECK_LIB_CODE([$1], [], [$3], [$4], [$5]) + +if test "${$3}" = "no" && test "x$2" != "x"; then +dnl loop through given libraries + for trylib in $2; do + EFL_CHECK_LIB_CODE([$1], [${trylib}], [$3], [$4], [$5]) + if test "${$3}" = "yes"; then + break + fi + done +fi +]) + dnl _EFL_CHECK_FUNC_DIRFD is for internal use -dnl _EFL_CHECK_FUNC_DIRFD(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) +dnl _EFL_CHECK_FUNC_DIRFD(EFL, VARIABLE) AC_DEFUN([_EFL_CHECK_FUNC_DIRFD], -[ -AC_LINK_IFELSE( - [ - AC_LANG_PROGRAM( - [[ +[EFL_CHECK_LIB_CODE([$1], [], [$2], [[ #ifdef HAVE_DIRENT_H # include <dirent.h> #endif - ]], - [[ -int main(void) -{ - DIR *dirp; - return dirfd(dirp); -} - ]]) - ], - [_efl_have_fct="yes"], - [_efl_have_fct="no"]) - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) +]], [[DIR *dirp; return dirfd(dirp);]]) ]) -dnl _EFL_CHECK_FUNC_DLADDR_PRIV is for internal use -dnl _EFL_CHECK_FUNC_DLADDR_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - -AC_DEFUN([_EFL_CHECK_FUNC_DLADDR_PRIV], -[ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - -LIBS_save="${LIBS}" -LIBS="${LIBS} $2" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif -#include <stdlib> -#include <dlfcn.h> - ]], - [[ -int res = dladdr(NULL, NULL); - ]])], - [ - m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" - _efl_have_fct="yes" - ], - [_efl_have_fct="no"]) - -LIBS="${LIBS_save}" - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) -]) - dnl _EFL_CHECK_FUNC_DLADDR is for internal use -dnl _EFL_CHECK_FUNC_DLADDR(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - +dnl _EFL_CHECK_FUNC_DLADDR(EFL, VARIABLE) AC_DEFUN([_EFL_CHECK_FUNC_DLADDR], [ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - case "$host_os" in mingw*) - _efl_have_fct="yes" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ldl" + $2="yes" + EFL_ADD_LIBS([$1], [-ldl]) ;; *) - _efl_have_fct="no" - -dnl Check is dladdr is in libc - _EFL_CHECK_FUNC_DLADDR_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - -dnl Check is dlopen is in libdl - if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_DLADDR_PRIV([$1], [-ldl], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - fi + EFL_FIND_LIB_FOR_CODE([$1], [-ldl], [$2], [[ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif +#include <stdlib.h> +#include <dlfcn.h> +]], [[int res = dladdr(NULL, NULL);]]) ;; esac - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) ]) -dnl _EFL_CHECK_FUNC_DLOPEN_PRIV is for internal use -dnl _EFL_CHECK_FUNC_DLOPEN_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - -AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN_PRIV], -[ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - -LIBS_save="${LIBS}" -LIBS="${LIBS} $2" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <dlfcn.h> - ]], - [[ -void *h = dlopen(0, 0); - ]])], - [ - m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" - _efl_have_fct="yes" - ], - [_efl_have_fct="no"]) - -LIBS="${LIBS_save}" - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) -]) - dnl _EFL_CHECK_FUNC_DLOPEN is for internal use -dnl _EFL_CHECK_FUNC_DLOPEN(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - +dnl _EFL_CHECK_FUNC_DLOPEN(EFL, VARIABLE) AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN], [ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - case "$host_os" in mingw*) - _efl_have_fct="yes" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ldl" + $2="yes" + EFL_ADD_LIBS([$1], [-ldl]) ;; *) - _efl_have_fct="no" - -dnl Check is dlopen is in libc - _EFL_CHECK_FUNC_DLOPEN_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - -dnl Check is dlopen is in libdl - if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_DLOPEN_PRIV([$1], [-ldl], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - fi + EFL_FIND_LIB_FOR_CODE([$1], [-ldl], [$2], [[ +#include <dlfcn.h> +]], [[void *h = dlopen(0, 0);]]) ;; esac - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) ]) -dnl _EFL_CHECK_FUNC_DLSYM_PRIV is for internal use -dnl _EFL_CHECK_FUNC_DLSYM_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - -AC_DEFUN([_EFL_CHECK_FUNC_DLSYM_PRIV], -[ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - -LIBS_save="${LIBS}" -LIBS="${LIBS} $2" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif -#include <stdlib.h> -#include <dlfcn.h> - ]], - [[ -void *res = dlsym(NULL, NULL); - ]])], - [ - m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" - _efl_have_fct="yes" - ], - [_efl_have_fct="no"]) - -LIBS="${LIBS_save}" - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) -]) - dnl _EFL_CHECK_FUNC_DLSYM is for internal use -dnl _EFL_CHECK_FUNC_DLSYM(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - +dnl _EFL_CHECK_FUNC_DLSYM(EFL, VARIABLE) AC_DEFUN([_EFL_CHECK_FUNC_DLSYM], [ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - case "$host_os" in mingw*) - _efl_have_fct="yes" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ldl" + $2="yes" + EFL_ADD_LIBS([$1], [-ldl]) ;; *) - _efl_have_fct="no" - -dnl Check is dlsym is in libc - _EFL_CHECK_FUNC_DLSYM_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - -dnl Check is dlopen is in libdl - if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_DLSYM_PRIV([$1], [-ldl], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - fi + EFL_FIND_LIB_FOR_CODE([$1], [-ldl], [$2], [[ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif +#include <stdlib.h> +#include <dlfcn.h> +]], [[void *res = dlsym(NULL, NULL);]]) ;; esac - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) ]) -dnl _EFL_CHECK_FUNC_FNMATCH_PRIV is for internal use -dnl _EFL_CHECK_FUNC_FNMATCH_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - -AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH_PRIV], -[ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - -LIBS_save="${LIBS}" -LIBS="${LIBS} $2" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <stdlib.h> -#include <fnmatch.h> - ]], - [[ -int g = fnmatch(NULL, NULL, 0); - ]])], - [ - m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" - _efl_have_fct="yes" - ], - [_efl_have_fct="no"]) - -LIBS="${LIBS_save}" - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) -]) - dnl _EFL_CHECK_FUNC_FNMATCH is for internal use -dnl _EFL_CHECK_FUNC_FNMATCH(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - +dnl _EFL_CHECK_FUNC_FNMATCH(EFL, VARIABLE) AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH], [ case "$host_os" in mingw*) - _efl_have_fct="yes" + $2="yes" ;; *) -dnl Check is fnmatch is in libc - _EFL_CHECK_FUNC_FNMATCH_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - -dnl Check is fnmatch is in libfnmatch - if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_FNMATCH_PRIV([$1], [-lfnmatch], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - fi - -dnl Check is fnmatch is in libiberty - if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_FNMATCH_PRIV([$1], [-liberty], [_efl_have_fct="yes"], [_efl_have_fct="no"]) - fi + EFL_FIND_LIB_FOR_CODE([$1], [-lfnmatch -liberty], [$2], [[ +#include <stdlib.h> +#include <fnmatch.h> +]], [[int g = fnmatch(NULL, NULL, 0);]]) ;; esac - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) ]) dnl _EFL_CHECK_FUNC_GETTIMEOFDAY is for internal use -dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - +dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, VARIABLE) AC_DEFUN([_EFL_CHECK_FUNC_GETTIMEOFDAY], [ case "$host_os" in mingw*) - _efl_have_fct="yes" + $2="yes" ;; *) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[ + EFL_CHECK_LIB_CODE([$1], [], [$2], [[ #include <stdlib.h> #include <sys/time.h> - ]], - [[ -int res; -res = gettimeofday(NULL, NULL); - ]])], - [_efl_have_fct="yes"], - [_efl_have_fct="no"]) +]], [[int res = gettimeofday(NULL, NULL);]]) - if test "x${_efl_have_fct}" = "xno" && test "x${enable_exotic}" = "xyes"; then - SAVE_LIBS="${LIBS}" + if test "${$2}" = "no" && test "x${enable_exotic}" = "xyes"; then SAVE_CFLAGS="${CFLAGS}" - LIBS="${LIBS} ${EXOTIC_LIBS}" CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[ + EFL_CHECK_LIB_CODE([$1], [${EXOTIC_LIBS}], [$2], [[ #include <Exotic.h> - ]], - [[ -int res; -res = gettimeofday(NULL, NULL); - ]])], - [_efl_have_fct="yes"], - [_efl_have_fct="no"]) - LIBS="${SAVE_LIBS}" +]], [[int res = gettimeofday(NULL, NULL);]]) CFLAGS="${SAVE_CFLAGS}" fi ;; esac - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) ]) -dnl _EFL_CHECK_FUNC_ICONV_PRIV is for internal use -dnl _EFL_CHECK_FUNC_ICONV_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - -AC_DEFUN([_EFL_CHECK_FUNC_ICONV_PRIV], -[ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - -LIBS_save="${LIBS}" -LIBS="${LIBS} $2" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <stdlib.h> -#include <iconv.h> - ]], - [[ -iconv_t ic; -size_t count = iconv(ic, NULL, NULL, NULL, NULL); - ]])], - [ - m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" - _efl_have_fct="yes" - ], - [_efl_have_fct="no"]) - -LIBS="${LIBS_save}" - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) -]) - dnl _EFL_CHECK_FUNC_ICONV is for internal use -dnl _EFL_CHECK_FUNC_ICONV(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - +dnl _EFL_CHECK_FUNC_ICONV(EFL, VARIABLE) AC_DEFUN([_EFL_CHECK_FUNC_ICONV], -[ +[dnl AC_ARG_WITH([iconv-link], AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]), [ - _efl_have_fct="yes" + $2="yes" iconv_libs=${withval} ], - [_efl_have_fct="no"]) + [$2="no"]) -AC_MSG_CHECKING([for explicit iconv link options]) if test "x${iconv_libs}" = "x" ; then - AC_MSG_RESULT([no explicit iconv link option]) -else - AC_MSG_RESULT([${iconv_libs}]) + EFL_FIND_LIB_FOR_CODE([$1], [-liconv -liconv_plug], [$2], [[ +#include <stdlib.h> +#include <iconv.h> +]], [[iconv_t ic; size_t count = iconv(ic, NULL, NULL, NULL, NULL);]]) fi - -dnl Check is iconv is in libc -if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_ICONV_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"]) -fi - -dnl Check is iconv is in libiconv -if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_ICONV_PRIV([$1], [-liconv], [_efl_have_fct="yes"], [_efl_have_fct="no"]) -fi - -dnl Check is iconv is in libiconv_plug -if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_ICONV_PRIV([$1], [-liconv_plug], [_efl_have_fct="yes"], [_efl_have_fct="no"]) -fi - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) ]) dnl _EFL_CHECK_FUNC_SETXATTR is for internal use -dnl _EFL_CHECK_FUNC_SETXATTR(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - +dnl _EFL_CHECK_FUNC_SETXATTR(EFL, VARIABLE) AC_DEFUN([_EFL_CHECK_FUNC_SETXATTR], -[ -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ +[EFL_CHECK_LIB_CODE([$1], [], [$2], [[ #include <stdlib.h> #include <sys/types.h> #include <sys/xattr.h> - ]], - [[ +]], [[ size_t tmp = listxattr("/", NULL, 0); tmp = getxattr("/", "user.ethumb.md5", NULL, 0); setxattr("/", "user.ethumb.md5", NULL, 0, 0); - ]])], - [_efl_have_fct="yes"], - [_efl_have_fct="no"]) +]]) -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) +if test "${$2}" = "yes"; then + AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.]) +fi ]) -dnl _EFL_CHECK_FUNC_SHM_OPEN_PRIV is for internal use -dnl _EFL_CHECK_FUNC_SHM_OPEN_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - -AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN_PRIV], -[ -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl - -LIBS_save="${LIBS}" -LIBS="${LIBS} $2" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ +dnl _EFL_CHECK_FUNC_SHM_OPEN is for internal use +dnl _EFL_CHECK_FUNC_SHM_OPEN(EFL, VARIABLE) +AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN], +[EFL_FIND_LIB_FOR_CODE([$1], [-lrt], [$2], [[ #include <sys/mman.h> #include <sys/stat.h> /* For mode constants */ #include <fcntl.h> /* For O_* constants */ - ]], - [[ -int fd; - -fd = shm_open("/dev/null", O_RDONLY, S_IRWXU | S_IRWXG | S_IRWXO); - ]])], - [ - m4_defn([UPEFL])[]_LIBS="$m4_defn([UPEFL])[]_LIBS $2" - requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" - _efl_have_fct="yes" - ], - [_efl_have_fct="no"]) - -LIBS="${LIBS_save}" - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) - -m4_popdef([DOWNEFL]) -m4_popdef([UPEFL]) +]], [[ +int fd = shm_open("/dev/null", O_RDONLY, S_IRWXU | S_IRWXG | S_IRWXO); +]]) ]) -dnl _EFL_CHECK_FUNC_SHM_OPEN is for internal use -dnl _EFL_CHECK_FUNC_SHM_OPEN(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) - -AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN], -[ -_efl_have_fct="no" - -dnl Check is shm_open is in libc -_EFL_CHECK_FUNC_SHM_OPEN_PRIV([$1], [], - [_efl_have_fct="yes"], - [_efl_have_fct="no"]) - -dnl Check is shm_open is in librt -if test "x${_efl_have_fct}" = "xno" ; then - _EFL_CHECK_FUNC_SHM_OPEN_PRIV([$1], [-lrt], - [_efl_have_fct="yes"], - [_efl_have_fct="no"]) -fi - -AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) -]) - dnl Macro that checks function availability dnl dnl EFL_CHECK_FUNC(EFL, FUNCTION) dnl AC_SUBST : EFL_CFLAGS and EFL_LIBS (EFL being replaced by its value) -dnl AC_DEFINE : EFL_HAVE_FUNCTION (FUNCTION being replaced by its value) +dnl AC_DEFINE : HAVE_FUNCTION (FUNCTION being replaced by its value) dnl result in efl_func_function (function being replaced by its value) AC_DEFUN([EFL_CHECK_FUNC], -[ +[dnl m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl m4_pushdef([DOWN], m4_translit([$2], [-A-Z], [_a-z]))dnl -m4_default([_EFL_CHECK_FUNC_]m4_defn([UP]))($1, [have_fct="yes"], [have_fct="no"]) - -if test "x$2" = "xsetxattr" ; then - AC_MSG_CHECKING([for extended attributes]) -else - AC_MSG_CHECKING([for ]m4_defn([DOWN])) -fi - +m4_default([_EFL_CHECK_FUNC_]m4_defn([UP]))($1, [have_fct]) +AC_MSG_CHECKING([for $2]) AC_MSG_RESULT([${have_fct}]) if test "x${have_fct}" = "xyes" ; then - if test "x$2" = "xsetxattr" ; then - AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.]) - else - AC_DEFINE([HAVE_]m4_defn([UP]), [1], [Define to 1 if you have the `]m4_defn([DOWN])[' function.]) - fi + AC_DEFINE([HAVE_]m4_defn([UP]), [1], [Define to 1 if you have the `]m4_defn([DOWN])[' function.]) fi efl_func_[]m4_defn([DOWN])="${have_fct}" - -m4_popdef([DOWN]) -m4_popdef([UP]) +m4_popdef([DOWN])dnl +m4_popdef([UP])dnl ]) dnl Macro that iterates over a sequence of space separated functions @@ -548,6 +238,4 @@ dnl EFL_CHECK_FUNCS(EFL, FUNCTIONS) AC_DEFUN([EFL_CHECK_FUNCS], -[ -m4_foreach_w([fct], [$2], [EFL_CHECK_FUNC($1, m4_defn([fct]))]) -]) +[m4_foreach_w([fct], [$2], [EFL_CHECK_FUNC($1, m4_defn([fct]))])]) Modified: trunk/efl/m4/efl_check_libs.m4 =================================================================== --- trunk/efl/m4/efl_check_libs.m4 2012-12-30 19:05:18 UTC (rev 81908) +++ trunk/efl/m4/efl_check_libs.m4 2012-12-30 21:10:52 UTC (rev 81909) @@ -12,18 +12,16 @@ AC_DEFUN([_EFL_CHECK_LIB_LIBJPEG], [dnl -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl -m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl +EFL_CHECK_LIB_CODE([$1], [-ljpeg], [have_fct], [[ +#include <stdio.h> +#include <jpeglib.h> +]], [[ +struct jpeg_error_mgr er; void *error = jpeg_std_error(&er); +]]) -AC_CHECK_HEADER([jpeglib.h], [], - [AC_MSG_ERROR([Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file])]) - -AC_CHECK_LIB([jpeg], [jpeg_std_error], - [requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ljpeg"], - [AC_MSG_ERROR([Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file])]) - -m4_popdef([DOWNEFL])dnl -m4_popdef([UPEFL])dnl +if test "${have_fct}" = "no"; then + AC_MSG_ERROR([Cannot find libjpeg. Make sure your CFLAGS and LDFLAGS environment variable are set properly.]) +fi ]) dnl _EFL_CHECK_LIB_ZLIB is for internal use @@ -32,25 +30,23 @@ AC_DEFUN([_EFL_CHECK_LIB_ZLIB], [dnl -m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl PKG_CHECK_EXISTS([zlib >= 1.2.3], [_efl_have_lib="yes"], [_efl_have_lib="no"]) -if test "x${_efl_have_lib}" = "xyes" ; then +if test "${_efl_have_lib}" = "yes"; then requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_[]m4_defn([DOWNEFL])} zlib >= 1.2.3" requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_[]m4_defn([DOWNEFL])} zlib >= 1.2.3" else - AC_CHECK_HEADER([zlib.h], [], - [AC_MSG_ERROR([Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file])]) + EFL_CHECK_LIB_CODE([$1], [-lz], [have_fct], [[ +#include <zlib.h> +]], [[const char *v = zlibVersion();]]) - AC_CHECK_LIB([z], [zlibVersion], - [requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -lz"], - [AC_MSG_ERROR([Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file])]) + if test "${have_fct}" = "no"; then + AC_MSG_ERROR([Cannot find zlib. Make sure your CFLAGS and LDFLAGS environment variable are set properly.]) + fi fi - m4_popdef([DOWNEFL])dnl -m4_popdef([UPEFL])dnl ]) dnl Macro that checks for a library @@ -61,11 +57,9 @@ AC_DEFUN([EFL_CHECK_LIB], [dnl m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl - -AC_MSG_CHECKING([for $2]) m4_default([_EFL_CHECK_LIB_]m4_defn([UP]))($1) +AC_MSG_CHECKING([for $2]) AC_MSG_RESULT([yes]) - m4_popdef([UP])dnl ]) |
From: Enlightenment S. <no-...@en...> - 2013-01-04 19:47:19
|
Log: efl: removed as they are now unused. Author: barbieri Date: 2013-01-04 11:47:09 -0800 (Fri, 04 Jan 2013) New Revision: 82231 Trac: http://trac.enlightenment.org/e/changeset/82231 Removed: trunk/efl/m4/efl_binary.m4 trunk/efl/m4/efl_enable.m4 |
From: Enlightenment S. <no-...@en...> - 2013-01-16 21:26:11
|
Log: fix internal library linkage to pull in dependencies. some libraries will need to pull more than its own .so, for example Eina.h includes eina_lock.h that includes eina_inline_lock_posix.x that will use pthread calls directly from user code. This was already listed in eina.pc, but not being present in USE_EINA_LIBS. Author: barbieri Date: 2013-01-16 13:25:58 -0800 (Wed, 16 Jan 2013) New Revision: 82909 Trac: http://trac.enlightenment.org/e/changeset/82909 Modified: trunk/efl/m4/efl.m4 Modified: trunk/efl/m4/efl.m4 =================================================================== --- trunk/efl/m4/efl.m4 2013-01-16 21:21:35 UTC (rev 82908) +++ trunk/efl/m4/efl.m4 2013-01-16 21:25:58 UTC (rev 82909) @@ -108,6 +108,7 @@ requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}" requirements_cflags_[]m4_defn([DOWNEFL])="-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" requirements_internal_libs_[]m4_defn([DOWNEFL])="lib/${libdirname}/lib${libname}.la ${requirements_internal_libs_[][]m4_defn([DOWNEFL])}" +requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNOTHER])} ${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])}" m4_popdef([DOWNOTHER])dnl m4_popdef([DOWNEFL])dnl ]) @@ -191,15 +192,10 @@ dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME) AC_DEFUN([EFL_OPTIONAL_INTERNAL_DEPEND_PKG], -[ -m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl - - have_[]m4_defn([DOWN])="no" +[dnl if test "x$2" = "xyes"; then EFL_INTERNAL_DEPEND_PKG([$1], [$3]) fi - -m4_popdef([DOWN]) ]) dnl EFL_ADD_LIBS(PKG, LIBS) @@ -230,6 +226,7 @@ m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl requirements_internal_libs_[]m4_defn([DOWN])="" +requirements_internal_deps_libs_[]m4_defn([DOWN])="" requirements_libs_[]m4_defn([DOWN])="" requirements_cflags_[]m4_defn([DOWN])="" requirements_pc_[]m4_defn([DOWN])="" @@ -274,10 +271,10 @@ esac m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS} ${EFL_COV_CFLAGS} ${EFL_LDFLAGS}" -m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${m4_defn([UP])_LDFLAGS} ${EFL_COV_LIBS} ${EFL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} " +m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${m4_defn([UP])_LDFLAGS} ${EFL_COV_LIBS} ${EFL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} " m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" -USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la" +USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la ${requirements_internal_deps_libs_[]m4_defn([DOWN])}" m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS} ${EFL_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_efl} -DEFL_[]m4_defn([UP])_BUILD=1" requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_efl}" requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_efl}" |
From: Enlightenment S. <no-...@en...> - 2013-01-17 20:58:15
|
Log: clean some whitelines from already lengthly configure file. Author: barbieri Date: 2013-01-17 12:58:07 -0800 (Thu, 17 Jan 2013) New Revision: 82951 Trac: http://trac.enlightenment.org/e/changeset/82951 Modified: trunk/efl/m4/efl.m4 Modified: trunk/efl/m4/efl.m4 =================================================================== --- trunk/efl/m4/efl.m4 2013-01-17 20:36:52 UTC (rev 82950) +++ trunk/efl/m4/efl.m4 2013-01-17 20:58:07 UTC (rev 82951) @@ -153,7 +153,7 @@ dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME, dnl and inserts dependencies in proper variables AC_DEFUN([EFL_DEPEND_PKG], -[ +[dnl m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl @@ -179,15 +179,14 @@ dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG], -[ +[dnl m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl have_[]m4_defn([DOWN])="no" if test "x$2" = "xyes"; then EFL_DEPEND_PKG([$1], [$3], [$4], [$5], [$6]) fi - -m4_popdef([DOWN]) +m4_popdef([DOWN])dnl ]) dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME) @@ -274,7 +273,7 @@ dnl dependencies (due internal libs). dnl AC_DEFUN([EFL_LIB_START], -[ +[dnl m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl @@ -293,27 +292,25 @@ m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}" m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" -AC_SUBST([requirements_libs_]m4_defn([DOWN])) -AC_SUBST([requirements_public_libs_]m4_defn([DOWN])) -AC_SUBST([requirements_cflags_]m4_defn([DOWN])) -AC_SUBST([requirements_pc_]m4_defn([DOWN])) -AC_SUBST(m4_defn([UP])[_LIBS]) -AC_SUBST(m4_defn([UP])[_INTERNAL_LIBS]) -AC_SUBST([USE_]m4_defn([UP])[_LIBS]) -AC_SUBST([USE_]m4_defn([UP])[_INTERNAL_LIBS]) -AC_SUBST(m4_defn([UP])[_LDFLAGS]) -AC_SUBST(m4_defn([UP])[_CFLAGS]) - -AC_MSG_NOTICE([Start $1 checks]) - -m4_popdef([UP]) -m4_popdef([DOWN]) +AC_SUBST([requirements_libs_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_public_libs_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_cflags_]m4_defn([DOWN]))dnl +AC_SUBST([requirements_pc_]m4_defn([DOWN]))dnl +AC_SUBST(m4_defn([UP])[_LIBS])dnl +AC_SUBST(m4_defn([UP])[_INTERNAL_LIBS])dnl +AC_SUBST([USE_]m4_defn([UP])[_LIBS])dnl +AC_SUBST([USE_]m4_defn([UP])[_INTERNAL_LIBS])dnl +AC_SUBST(m4_defn([UP])[_LDFLAGS])dnl +AC_SUBST(m4_defn([UP])[_CFLAGS])dnl +AC_MSG_NOTICE([Start $1 checks])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl ]) dnl EFL_LIB_END(PKG) dnl finishes the setup of an EFL library AC_DEFUN([EFL_LIB_END], -[ +[dnl m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl @@ -334,16 +331,16 @@ requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_efl}" requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_efl}" -AC_MSG_NOTICE([Finished $1 checks]) -m4_popdef([UP]) -m4_popdef([DOWN]) +AC_MSG_NOTICE([Finished $1 checks])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl ]) dnl EFL_LIB_START_OPTIONAL(PKG, TEST) dnl test if library should be build and then EFL_LIB_START() dnl must call EFL_LIB_END_OPTIONAL() to close it. AC_DEFUN([EFL_LIB_START_OPTIONAL], -[ +[dnl m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl @@ -357,18 +354,16 @@ if test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"; then EFL_LIB_START([$1]) AC_DEFINE([HAVE_]m4_defn([UP]), [1], [optional EFL $1 is enabled]) - dnl closed at EFL_LIB_END_OPTIONAL() - -m4_popdef([UP]) -m4_popdef([DOWN]) +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl ]) dnl EFL_LIB_END_OPTIONAL(PKG) dnl closes block started by EFL_LIB_START_OPTIONAL() and then dnl defines AM_CONDITIONAL([HAVE_PKG]) and AC_DEFINE([HAVE_PKG]) AC_DEFUN([EFL_LIB_END_OPTIONAL], -[ +[dnl m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl @@ -376,8 +371,7 @@ EFL_LIB_END([$1]) fi -AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"]) - -m4_popdef([UP]) -m4_popdef([DOWN]) +AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"])dnl +m4_popdef([UP])dnl +m4_popdef([DOWN])dnl ]) |
From: Enlightenment S. <no-...@en...> - 2013-01-18 15:25:10
|
Log: optimize check for compiler and linker flags. do it once with all flags and just test individual if fails. Saves dozen of compiler/linker runs. Author: barbieri Date: 2013-01-18 07:25:00 -0800 (Fri, 18 Jan 2013) New Revision: 82983 Trac: http://trac.enlightenment.org/e/changeset/82983 Modified: trunk/efl/m4/efl_compiler.m4 Modified: trunk/efl/m4/efl_compiler.m4 =================================================================== --- trunk/efl/m4/efl_compiler.m4 2013-01-18 14:45:44 UTC (rev 82982) +++ trunk/efl/m4/efl_compiler.m4 2013-01-18 15:25:00 UTC (rev 82983) @@ -6,93 +6,85 @@ dnl Macro that checks for a compiler flag availability dnl -dnl EFL_CHECK_COMPILER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]]) +dnl _EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS) dnl AC_SUBST : EFL_CFLAGS (EFL being replaced by its value) +dnl have_flag: yes or no. +AC_DEFUN([_EFL_CHECK_COMPILER_FLAGS], +[dnl +m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))dnl -AC_DEFUN([EFL_CHECK_COMPILER_FLAG], -[ -m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z])) -m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z])) - dnl store in options -Wfoo if -Wno-foo is passed -option=m4_bpatsubst([[$2]], [-Wno-], [-W]) - +option="m4_bpatsubst([[$2]], [-Wno-], [-W])" CFLAGS_save="${CFLAGS}" CFLAGS="${CFLAGS} ${option}" - AC_LANG_PUSH([C]) -AC_MSG_CHECKING([whether the compiler supports $2]) +AC_MSG_CHECKING([whether the compiler supports $2]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]])], [have_flag="yes"], [have_flag="no"]) AC_MSG_RESULT([${have_flag}]) -CFLAGS="${CFLAGS_save}" AC_LANG_POP([C]) - +CFLAGS="${CFLAGS_save}" if test "x${have_flag}" = "xyes" ; then UPEFL[_CFLAGS]="${UPEFL[_CFLAGS]} [$2]" fi -AC_ARG_VAR(UPEFL[_CFLAGS], [preprocessor flags for $2]) -AC_SUBST(UPEFL[_CFLAGS]) - -m4_popdef([UP]) -m4_popdef([UPEFL]) +AC_SUBST(UPEFL[_CFLAGS])dnl +m4_popdef([UPEFL])dnl ]) -dnl Macro that iterates over a sequence of white separated flags -dnl and that call EFL_CHECK_COMPILER_FLAG() for each of these flags -dnl dnl EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS) - +dnl Checks if FLAGS are supported and add to EFL_CLFAGS. +dnl +dnl It will first try every flag at once, if one fails will try them one by one. AC_DEFUN([EFL_CHECK_COMPILER_FLAGS], -[ -m4_foreach_w([flag], [$2], [EFL_CHECK_COMPILER_FLAG([$1], m4_defn([flag]))]) +[dnl +_EFL_CHECK_COMPILER_FLAGS([$1], [$2]) +if test "${have_flag}" != "yes"; then +m4_foreach_w([flag], [$2], [_EFL_CHECK_COMPILER_FLAGS([$1], m4_defn([flag]))]) +fi ]) dnl Macro that checks for a linker flag availability dnl -dnl EFL_CHECK_LINKER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]]) +dnl _EFL_CHECK_LINKER_FLAGS(EFL, FLAGS) dnl AC_SUBST : EFL_LDFLAGS (EFL being replaced by its value) +dnl have_flag: yes or no +AC_DEFUN([_EFL_CHECK_LINKER_FLAGS], +[dnl +m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))dnl -AC_DEFUN([EFL_CHECK_LINKER_FLAG], -[ -m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z])) -m4_pushdef([UP], m4_translit([[$2]], [,-a-z], [__A-Z])) - LDFLAGS_save="${LDFLAGS}" LDFLAGS="${LDFLAGS} $2" - AC_LANG_PUSH([C]) -AC_MSG_CHECKING([whether the linker supports $2]) +AC_MSG_CHECKING([whether the linker supports $2]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]])], [have_flag="yes"], [have_flag="no"]) AC_MSG_RESULT([${have_flag}]) -LDFLAGS="${LDFLAGS_save}" AC_LANG_POP([C]) - +LDFLAGS="${LDFLAGS_save}" if test "x${have_flag}" = "xyes" ; then UPEFL[_LDFLAGS]="${UPEFL[_LDFLAGS]} [$2]" fi -AC_SUBST(UPEFL[_LDFLAGS]) - -m4_popdef([UP]) -m4_popdef([UPEFL]) +AC_SUBST(UPEFL[_LDFLAGS])dnl +m4_popdef([UPEFL])dnl ]) -dnl Macro that iterates over a sequence of white separated flags -dnl and that call EFL_CHECK_LINKER_FLAG() for each of these flags -dnl dnl EFL_CHECK_LINKER_FLAGS(EFL, FLAGS) - +dnl Checks if FLAGS are supported and add to EFL_CLFAGS. +dnl +dnl It will first try every flag at once, if one fails will try them one by one. AC_DEFUN([EFL_CHECK_LINKER_FLAGS], -[ -m4_foreach_w([flag], [$2], [EFL_CHECK_LINKER_FLAG([$1], m4_defn([flag]))]) -]) +[dnl +_EFL_CHECK_LINKER_FLAGS([$1], [$2]) +if test "${have_flag}" != "yes"; then +m4_foreach_w([flag], [$2], [_EFL_CHECK_LINKER_FLAGS([$1], m4_defn([flag]))]) +fi +])dnl |
From: Enlightenment S. <no-...@en...> - 2013-01-18 18:51:23
|
Log: fix flags and libs ordering. linker (ld) is that kind of tool that argument order matters, if you -Wl,--as-needed, it will be worth just for libraries following it. Then we need to use EFL_LDFLAGS before everything else, otherwise it end being useless. Author: barbieri Date: 2013-01-18 10:51:16 -0800 (Fri, 18 Jan 2013) New Revision: 82991 Trac: http://trac.enlightenment.org/e/changeset/82991 Modified: trunk/efl/m4/efl.m4 Modified: trunk/efl/m4/efl.m4 =================================================================== --- trunk/efl/m4/efl.m4 2013-01-18 17:56:48 UTC (rev 82990) +++ trunk/efl/m4/efl.m4 2013-01-18 18:51:16 UTC (rev 82991) @@ -363,12 +363,12 @@ ;; esac -m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS} ${EFL_COV_CFLAGS} ${EFL_LDFLAGS}" -m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${m4_defn([UP])_LDFLAGS} ${EFL_COV_LIBS} ${EFL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} " +m4_defn([UP])_LDFLAGS="${EFL_COV_LDFLAGS} ${EFL_LDFLAGS} ${m4_defn([UP])_LDFLAGS}" +m4_defn([UP])_LIBS=" ${m4_defn([UP])_LDFLAGS} ${EFL_COV_LIBS} ${EFL_LIBS} ${m4_defn([UP])_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} " m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la ${requirements_internal_deps_libs_[]m4_defn([DOWN])}" -m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS} ${EFL_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_efl} -DEFL_[]m4_defn([UP])_BUILD=1" +m4_defn([UP])_CFLAGS="${EFL_COV_CFLAGS} ${EFL_CFLAGS} ${m4_defn([UP])_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_efl} -DEFL_[]m4_defn([UP])_BUILD=1" requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_efl}" requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_efl}" |
From: Enlightenment S. <no-...@en...> - 2013-01-18 23:01:05
|
Log: fix ecore_evas modules build broken by r82976. Many thanks to billiob that was persistent enough to make me look at it while I was calling it "impossible". That stupid variable was being used in ecore_check_module.m4 :-( Author: barbieri Date: 2013-01-18 15:00:57 -0800 (Fri, 18 Jan 2013) New Revision: 82999 Trac: http://trac.enlightenment.org/e/changeset/82999 Modified: trunk/efl/m4/ecore_check_module.m4 Modified: trunk/efl/m4/ecore_check_module.m4 =================================================================== --- trunk/efl/m4/ecore_check_module.m4 2013-01-18 19:50:00 UTC (rev 82998) +++ trunk/efl/m4/ecore_check_module.m4 2013-01-18 23:00:57 UTC (rev 82999) @@ -7,15 +7,12 @@ have_ecore_evas_[]m4_defn([DOWN])="no" want_module="$2" -if test "x$have_ecore_evas" = "xyes"; then - if test "x$want_module" = "xyes" || test "x$want_module" = "xstatic"; then - $3 +if test "x$want_module" = "xyes" || test "x$want_module" = "xstatic"; then + $3 - AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $1 Engine in Ecore_Evas]) - have_ecore_evas_[]m4_defn([DOWN])="yes" - fi + AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $1 Engine in Ecore_Evas]) + have_ecore_evas_[]m4_defn([DOWN])="yes" fi - EFL_ADD_FEATURE([ECORE_EVAS], [$1], [${want_module}])dnl AM_CONDITIONAL([BUILD_ECORE_EVAS_]UP, [test "x$have_ecore_evas_]m4_defn([DOWN])[" = "xyes"])dnl m4_popdef([UP])dnl |
From: Enlightenment S. <no-...@en...> - 2013-01-22 21:58:32
|
Log: try to simplify internal library dependency. Just use the lib/name/libname.la as libtool should be responsible to emit dependencies to compiler when it evaluates. This should reduce over-linking, also reducing the compile lines in our verbose builds ;-) NOTE: this seems to work on Fedora 18 (which also bitch about DSO), so hopefully works on Debian and Ubuntu (and elsewhere). Please revert if breaks builds! Author: barbieri Date: 2013-01-22 13:58:25 -0800 (Tue, 22 Jan 2013) New Revision: 83105 Trac: http://trac.enlightenment.org/e/changeset/83105 Modified: trunk/efl/m4/efl.m4 Modified: trunk/efl/m4/efl.m4 =================================================================== --- trunk/efl/m4/efl.m4 2013-01-22 21:25:08 UTC (rev 83104) +++ trunk/efl/m4/efl.m4 2013-01-22 21:58:25 UTC (rev 83105) @@ -288,9 +288,9 @@ dnl package depend. Used in automake's _DEPENDENCIES. dnl dnl USE_PKG_LIBS: what to use in automake's _LIBADD or _LDADD when using -dnl this PKG (PKG_LIBS + libpkg.la) +dnl this PKG (libpkg.la and public dependencies) dnl -dnl USE_PKG_INTERNAL_LIBS: extends PKG_INTERNAL_LIBS with lib/pkg/libpkg.la +dnl USE_PKG_INTERNAL_LIBS: lib/pkg/libpkg.la dnl dnl requirements_pc_pkg: all pkg-config (pc) files used by this pkg, dnl includes internal EFL (used in 'Requires.private' in pkg.pc) @@ -366,8 +366,8 @@ m4_defn([UP])_LDFLAGS="${EFL_COV_LDFLAGS} ${EFL_LDFLAGS} ${m4_defn([UP])_LDFLAGS}" m4_defn([UP])_LIBS=" ${m4_defn([UP])_LDFLAGS} ${EFL_COV_LIBS} ${EFL_LIBS} ${m4_defn([UP])_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} " m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" -USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" -USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la ${requirements_internal_deps_libs_[]m4_defn([DOWN])}" +USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LDFLAGS} ${EFL_COV_LIBS} ${EFL_LIBS} lib/${libdirname}/lib${libname}.la ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_efl}" +USE_[]m4_defn([UP])_INTERNAL_LIBS="lib/${libdirname}/lib${libname}.la" m4_defn([UP])_CFLAGS="${EFL_COV_CFLAGS} ${EFL_CFLAGS} ${m4_defn([UP])_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_efl} -DEFL_[]m4_defn([UP])_BUILD=1" requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_efl}" requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_efl}" |