Mount JFFS2 Image
Saturday, October 25, 2008
Example of how to mount a JFFS2 image using mtdblock.
Clay Shirky: Institutions vs. collaboration
Monday, July 14, 2008
This is a rather interesting talk that takes some very foundational ideas from open source software development, P2P networks, and social networking and implies that these paradigms can apply to a lot more.
Just do it.
- Nike
GNU Autoconf Scripting Snippets
Thursday, January 13, 2005 by digitalpeer
Face it, you're constantly searching for autoconf macros or how to do things when you've got your source written and you're ready to get it built with the GNU auto tools. I do the same thing. So, here's a bunch of configure.ac or configure.in snippets I've seen or written for your viewing pleasure.
Generate variables with the build, host, and target identifiers.
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
An if,else statement.
if test "x${with_gnome}" = xyes
then
GNOME_PACKAGES="gtk+-2.0 libgnome-2.0 libgnomeui-2.0 pango"
elif test "x${with_gtk}" = xyes
then
GNOME_PACKAGES="gtk+-2.0"
else
GNOME_PACKAGES=""
fi
A for loop over a list of words.
for pkg in $GNOME_PACKAGES
do
AC_MSG_CHECKING([version of $pkg])
if gnomevers=`pkg-config --modversion $pkg`
then
AC_MSG_RESULT($gnomevers)
else
AC_MSG_ERROR([$pkg was not found by pkg-config])
fi
done
Define a variable for use later in your Makefile.am.
GNOME_CFLAGS=-g
AC_SUBST(GNOME_CFLAGS)
Display a notice during configure.
AC_MSG_NOTICE([Adding gcc options: $CFLAGS])
Try to compile a test code and report the results.
AC_TRY_COMPILE([
#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif],[
#ifdef HAVE_MMAP
if (mmap (NULL, 0, 0, 0, 0, 0) == MAP_FAILED)
return 0;
#else
#error mmap unavailable
#endif], ,[
AC_DEFINE([MAP_FAILED], [(void *)-1L],
[Define if MAP_FAILED constant not available])
])
AC_MSG_RESULT()