build: Remove trailing whitespace
build: Don't add -O2 to CFLAGS

This is what automake will use by default, so no need to add it
explicitly in configure.ac
build: Set AM_CFLAGS rather than CFLAGS

configure.ac/Makefile.am should use AM_CFLAGS to pass additional
compiler flags, CFLAGS is reserved for use by the person compiling
the library.
build: Remove unused libdiscid_VERSION from configure.ac
build: Use automake silent rules if available
build: Remove unused AC_SUBST(LIBTOOL_DEPS)

No Makefile.am references LIBTOOL_DEPS
Update .gitignore
build: Add call to AM_PROG_AR

automake complains about it otherwise when invoked with -Wall
/usr/share/automake-1.12/am/ltlibrary.am:
     warning: 'libdiscid.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.12/am/ltlibrary.am:
     archiver requires 'AM_PROG_AR' in 'configure.ac'
build: Remove redundant EXTRA_DIST

config-cmake.h.in is already listed in Makefile.am's EXTRA_DIST,
no need to have it as well in configure.ac (I'm not even sure this
is doing anything).
build: Move setting of automake options to AM_INIT_AUTOMAKE
build: Use noinst_HEADERS rather than EXTRA_DIST

This is more usual for a private header file.
build: Define per-OS automake conditional

They will be used in the next commits to conditionally defines
libraries/source files to be used depending on the platform we
are compiling for.
build: Use conditionals for OS-specific libraries

Depending on the OS, libdiscid may need to link with OS-specific
libraries. Now that we have per-OS automake conditionals available,
we can make use of those rather than forcing LIBS in configure.ac.
build: Use conditionals for OS-specific source files

OS-specific source files were defined in configure.ac through
AC_SUBST, and then they were forced to be dist'ed using
an EXTRA_ Makefile.am variable.
This is quite unusual, now that we have automake conditionals
for each supported OS, we can make use of them.
build: Move headers to libdiscid_la_SOURCES

Header files are sources as well, so we can list them in a _SOURCES
primary rather than in EXTRA_DIST.
build: Use per-target CPPFLAGS

We can set CPPFLAGS in libdiscid_la_CPPFLAGS rather than AM_CPPFLAGS
to be consistent with all the other libdiscid_la_XXXX variables.