GNU Autoconf and Automake Variables

Some parts of this post use excerpts from the GNU Autoconf and Automake manuals.

The prefix variable is usually set as /usr/local or /usr which may be overridden (example: ./configure --prefix=/usr). Automake extends the standard Directory Variable list with:

# In the following statements a '=' character means: is equivalent to.
   $(pkgdatadir) = ${prefix}/share/$(PACKAGE)
$(pkgincludedir) = ${prefix}/include/$(PACKAGE)
    $(pkglibdir) = ${prefix}/lib/$(PACKAGE)
$(pkglibexecdir) = ${exec_prefix}/libexec/$(PACKAGE)

# Some other common package specific directories are:
                      $(docdir) = ${prefix}/share/doc/$(PACKAGE_TARNAME)
       $(sysconfdir)/$(PACKAGE) = ${prefix}/etc/$(PACKAGE)
$(localstatedir)/lib/$(PACKAGE) = ${prefix}/var/lib/$(PACKAGE)
Posted in Software Development | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

MySQL Select, Replace and If Statement Example

SELECT avatar, filename, REPLACE(filename,'.svg','.png') AS image,
IF(avatar=filename,'selected','') AS selected FROM users, user_files
WHERE username = '[username]' AND user_name = '[username]'
Posted in Web Development | Tagged , , , , , , , , , , | Leave a comment

Hide a Broken HTML Image Element When an Error Occurs

<!-- Hide a Broken HTML Image Element When an Error Occurs -->
<img src="missing.png" onerror="this.style.display='none'" />

The above example is an excerpt from http://www.phpied.com/hide-broken-images/. I’m re-posting the snippet of code here.

Posted in Web Development | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Welcome to Free and Open Source Developer Notes

Welcome to Free and Open Source Developer Notes. This is a place for my notes as I grow in the fruitful culture of Free and Open Source Development. From time to time I tend to forget useful tidbits, procedures and caveats. These notes are primarily for my own personal edification. However, others might find them useful as well. I will keep them here readily available to share with all. Use them at your own risk. By using any content contained at this site, you accept full responsibility of the results.

Posted in Introduction | Tagged , , , , , , , , , , , , , | Leave a comment