Index: configure.ac
===================================================================
--- configure.ac	(revision 36214)
+++ configure.ac	(working copy)
@@ -184,6 +184,33 @@
     fi
 ])
 
+AC_ARG_ENABLE(shared,
+  AS_HELP_STRING([--enable-shared], [Build the shared libraries.]),
+  [
+    if test "$enableval" = "yes" ; then
+      LT_LDFLAGS="--enable-shared $LT_LDFLAGS"
+    else
+      LT_LDFLAGS="--disable-shared $LT_LDFLAGS"
+    fi
+  ],
+  [
+    enable_shared="yes"
+    LT_LDFLAGS="--enable-shared $LT_LDFLAGS"
+  ])
+AC_ARG_ENABLE(static,
+  AS_HELP_STRING([--enable-static], [Build the static libraries.]),
+  [
+    if test "$enableval" = "yes" ; then
+      LT_LDFLAGS="--enable-static $LT_LDFLAGS"
+    else
+      LT_LDFLAGS="--disable-static $LT_LDFLAGS"
+    fi
+  ],
+  [
+    enable_static="yes"
+    LT_LDFLAGS="--enable-static $LT_LDFLAGS"
+  ])
+
 AC_SUBST(LT_LDFLAGS)
 
 dnl Check if -no-undefined is needed for the platform.

