On Thu, 17 Sep 2009, Enlightenment SVN wrote:
> Log: > configure summary, maximum log level and other improvements. if you think it can be useful for the other EFL, i can provide an m4 macro for the maximum log level Vincent > Have all source to include config.h conditionally (HAVE_CONFIG_H), > define EINA_LOG_LEVEL_MAXIMUM, minor changes to configure.ac to make > it conform with the rest of efl. > > > Author: barbieri > Date: 2009-09-17 05:04:35 -0700 (Thu, 17 Sep 2009) > New Revision: 42544 > > Modified: > trunk/ethumb/configure.ac trunk/ethumb/src/bin/ethumb.c > trunk/ethumb/src/bin/ethumbd.c trunk/ethumb/src/bin/ethumbd_child.c > trunk/ethumb/src/bin/ethumbd_client.c trunk/ethumb/src/lib/md5.c > trunk/ethumb/src/plugins/emotion/emotion.c > trunk/ethumb/src/plugins/epdf/epdf.c trunk/ethumb/src/tests/ethumb_dbus.c > > Modified: trunk/ethumb/configure.ac > =================================================================== > --- trunk/ethumb/configure.ac 2009-09-17 09:03:13 UTC (rev 42543) > +++ trunk/ethumb/configure.ac 2009-09-17 12:04:35 UTC (rev 42544) > @@ -1,13 +1,13 @@ > -AC_INIT(ethumb, 0.1, [email protected]) > -AC_PREREQ(2.52) > -AC_CONFIG_SRCDIR(configure.ac) > +AC_INIT([ethumb], [0.1], [[email protected]]) > +AC_PREREQ([2.52]) > +AC_CONFIG_SRCDIR([configure.ac]) > +AC_CONFIG_MACRO_DIR([m4]) > AC_CANONICAL_BUILD > AC_CANONICAL_HOST > AC_ISC_POSIX > > AM_INIT_AUTOMAKE(1.6 dist-bzip2) > AM_CONFIG_HEADER(config.h) > -AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") > _XTERM_COLORS > > AC_PROG_CC > @@ -42,6 +42,22 @@ > > EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"]) > > +with_max_log_level="<unset>" > +AC_ARG_WITH(internal-maximum-log-level, > + [AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER], > + [limit eina internal log level to the given number, any > call to EINA_LOG() with values greater than this will be compiled out, > ignoring runtime settings, but saving function calls.])], > + [ > + if test "x${withval}" != "xno"; then > + if echo "${withval}" | grep '^[[0-9]]\+$' >/dev/null 2>/dev/null; then > + AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than > ${withval}]) > + AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${withval}, [if set, > logging is limited to this amount.]) > + with_max_log_level="${withval}" > + else > + AC_MSG_ERROR([--with-internal-maximum-log-level takes a decimal > number, got "${withval}" instead.]) > + fi > + fi > + ], [:]) > + > PKG_CHECK_MODULES(EINA, [eina-0]) > PKG_CHECK_MODULES(EVAS, [evas]) > PKG_CHECK_MODULES(ECORE, [ecore]) > @@ -114,3 +130,53 @@ > m4/Makefile > doc/Makefile > ]) > + > +txt_strip() { > + echo "[$]@" | sed -e 's/^[[ \t]]*\([[^ \t]]*\)[[ \t]]*$/\1/g' > +} > + > +MODS="" > +for mod in $OPTIONAL_MODULES; do > + MODS="$MODS ${COLOR_HGREEN}+$mod${COLOR_END}" > +done > +MODS=$(txt_strip $MODS) > + > +UNUSED_MODS="" > +for mod in $UNUSED_OPTIONAL_MODULES; do > + UNUSED_MODS="$UNUSED_MODS ${COLOR_HRED}-$mod${COLOR_END}" > +done > +UNUSED_MODS=$(txt_strip $UNUSED_MODS) > + > +cat <<SUMMARY_EOF > + > +Summary: > + * project..........: $PACKAGE $VERSION > + * prefix...........: $(txt_strip $prefix) > + * DBus services dir: $(txt_strip $dbusservicedir) > + * CFLAGS...........: $(txt_strip $CFLAGS) > + * LDFLAGS..........: $(txt_strip $LDFLAGS) > + > +Configuration Options Summary: > + > + * maximum log level: ${with_max_log_level} > + * documentation....: ${build_doc} > + > +SUMMARY_EOF > + > +if test "x$MODS" != "x"; then > + echo -e " * enabled modules..: $MODS" > +fi > + > +if test "x$UNUSED_MODS" != "x"; then > + echo -e " * disabled modules.: $UNUSED_MODS" > +fi > + > +cat << HINT_EOF > + > +now type: > + > +Now type 'make' ('gmake' on some systems) to compile $PACKAGE, and > +then afterwards as root (or the user who will install this), type > +'make install'. Change users with 'su' or 'sudo' appropriately. > + > +HINT_EOF > > Modified: trunk/ethumb/src/bin/ethumb.c > =================================================================== > --- trunk/ethumb/src/bin/ethumb.c 2009-09-17 09:03:13 UTC (rev 42543) > +++ trunk/ethumb/src/bin/ethumb.c 2009-09-17 12:04:35 UTC (rev 42544) > @@ -21,7 +21,9 @@ > * @author Rafael Antognolli <[email protected]> > * @author Gustavo Sverzut Barbieri <[email protected]> > */ > -#include <config.h> > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > > Modified: trunk/ethumb/src/bin/ethumbd.c > =================================================================== > --- trunk/ethumb/src/bin/ethumbd.c 2009-09-17 09:03:13 UTC (rev 42543) > +++ trunk/ethumb/src/bin/ethumbd.c 2009-09-17 12:04:35 UTC (rev 42544) > @@ -20,7 +20,9 @@ > * > * @author Rafael Antognolli <[email protected]> > */ > -#include <config.h> > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > > Modified: trunk/ethumb/src/bin/ethumbd_child.c > =================================================================== > --- trunk/ethumb/src/bin/ethumbd_child.c 2009-09-17 09:03:13 UTC (rev > 42543) > +++ trunk/ethumb/src/bin/ethumbd_child.c 2009-09-17 12:04:35 UTC (rev > 42544) > @@ -21,6 +21,9 @@ > * @author Rafael Antognolli <[email protected]> > */ > > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > #include <stdlib.h> > #include <unistd.h> > #include <limits.h> > > Modified: trunk/ethumb/src/bin/ethumbd_client.c > =================================================================== > --- trunk/ethumb/src/bin/ethumbd_client.c 2009-09-17 09:03:13 UTC (rev > 42543) > +++ trunk/ethumb/src/bin/ethumbd_client.c 2009-09-17 12:04:35 UTC (rev > 42544) > @@ -21,7 +21,9 @@ > * @author Rafael Antognolli <[email protected]> > * @author Gustavo Sverzut Barbieri <[email protected]> > */ > -#include <config.h> > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > > Modified: trunk/ethumb/src/lib/md5.c > =================================================================== > --- trunk/ethumb/src/lib/md5.c 2009-09-17 09:03:13 UTC (rev 42543) > +++ trunk/ethumb/src/lib/md5.c 2009-09-17 12:04:35 UTC (rev 42544) > @@ -15,6 +15,10 @@ > * will fill a supplied 16-byte array with the digest. > */ > > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > + > #include <string.h> /* for memcpy() */ > #include "md5.h" > > > Modified: trunk/ethumb/src/plugins/emotion/emotion.c > =================================================================== > --- trunk/ethumb/src/plugins/emotion/emotion.c 2009-09-17 09:03:13 UTC > (rev 42543) > +++ trunk/ethumb/src/plugins/emotion/emotion.c 2009-09-17 12:04:35 UTC > (rev 42544) > @@ -1,6 +1,9 @@ > #include "Ethumb.h" > #include "Ethumb_Plugin.h" > + > +#ifdef HAVE_CONFIG_H > #include "config.h" > +#endif > > #include <stdio.h> > #include <stdlib.h> > > Modified: trunk/ethumb/src/plugins/epdf/epdf.c > =================================================================== > --- trunk/ethumb/src/plugins/epdf/epdf.c 2009-09-17 09:03:13 UTC (rev > 42543) > +++ trunk/ethumb/src/plugins/epdf/epdf.c 2009-09-17 12:04:35 UTC (rev > 42544) > @@ -1,6 +1,9 @@ > #include "Ethumb.h" > #include "Ethumb_Plugin.h" > + > +#ifdef HAVE_CONFIG_H > #include "config.h" > +#endif > > #include <stdio.h> > #include <stdlib.h> > > Modified: trunk/ethumb/src/tests/ethumb_dbus.c > =================================================================== > --- trunk/ethumb/src/tests/ethumb_dbus.c 2009-09-17 09:03:13 UTC (rev > 42543) > +++ trunk/ethumb/src/tests/ethumb_dbus.c 2009-09-17 12:04:35 UTC (rev > 42544) > @@ -20,7 +20,9 @@ > * > * @author Rafael Antognolli <[email protected]> > */ > -#include <config.h> > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > enlightenment-svn mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
