Fix libfan_la_CXXFLAGS

The libfan_la_CXXFLAGS was incorrectly defined as empty by a typo, fix
it.
Then specify gcc-ar gcc-ranlib for link time optimization, otherwise the
static library will get link error.

Tested: Verify the build is OK in CI, local build, and SDK build.
Resolves openbmc/phosphor-fan-presence#11

Change-Id: I17c83b9927a796f8928a71688c1640d1a602a108
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/configure.ac b/configure.ac
index 94de978..0cb53a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,10 @@
 AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
 AM_SILENT_RULES([yes])
 
+# Use gcc-ar and gcc-ranlib for static libraries built with -flto
+AC_SUBST([AR], [${ac_tool_prefix}gcc-ar])
+AC_SUBST([RANLIB], [${ac_tool_prefix}gcc-ranlib])
+
 # Checks for programs.
 AC_PROG_CXX
 AM_PROG_AR