diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ac_ecore.m4 | 20 | ||||
-rw-r--r-- | m4/ac_espik_debug.m4 | 24 |
2 files changed, 37 insertions, 7 deletions
diff --git a/m4/ac_ecore.m4 b/m4/ac_ecore.m4 new file mode 100644 index 0000000..952026a --- /dev/null +++ b/m4/ac_ecore.m4 @@ -0,0 +1,20 @@ +AC_DEFUN([AC_CHK_ECORE], +[ + AC_ARG_WITH( + [ecore-config], + [ --with-ecore-config=ECORE_CONFIG_PATH use ecore-config specified ], + [ECORE_CONFIG=$withval; + if ! test -x "$ECORE_CONFIG"; then + AC_MSG_ERROR([$ECORE_CONFIG not found]) + fi], + [AC_PATH_PROG(ECORE_CONFIG, "ecore-config", "", $PATH) + if test -z "$ECORE_CONFIG"; then + AC_MSG_ERROR([You need ecore !]) + fi]) + + ecore_cflags=`$ECORE_CONFIG --cflags` + ecore_libs=`$ECORE_CONFIG --libs` + + AC_SUBST(ecore_cflags) + AC_SUBST(ecore_libs) +]) diff --git a/m4/ac_espik_debug.m4 b/m4/ac_espik_debug.m4 index d0e3795..0f6dcaf 100644 --- a/m4/ac_espik_debug.m4 +++ b/m4/ac_espik_debug.m4 @@ -1,17 +1,27 @@ dnl Debug mode -AC_DEFUN([AC_ESPIK_DEBUG]), +AC_DEFUN([AC_ESPIK_DEBUG], [ + AC_MSG_CHECKING(for debug) AC_ARG_ENABLE( [debug], - AC_HELP_STRING( - [--enable-debug], [Enable debug mode (default=yes)]), - [if test "$enable_debug" = "yes" ; then - DEBUG_CFLAGS="-g -D_ESPIK_DEBUG_" + AC_HELP_STRING([--enable-debug], [Enable debug mode (default=yes)]), + [if test "$enable_debug" = "no"; then + debug="no" else - DEBUG_LDFLAGS="-s" - fi], + debug="yes" + fi + ], [debug="yes"]) + if test "$debug" != "no"; then + debug="yes" + DEBUG_CFLAGS="-g -D_ESPIK_DEBUG_" + else + DEBUG_LDFLAGS="-s" + fi + + AC_MSG_RESULT($debug: $DEBUG_CFLAGS$DEBUG_LDFLAGS) + AC_SUBST(DEBUG_CFLAGS) AC_SUBST(DEBUG_LDFLAGS) ]) |